ID:               48748
 Comment by:       sc1n at yahoo dot com
 Reported By:      sc1n at yahoo dot com
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: FreeBSD & Linux
 PHP Version:      5.2.10
 New Comment:

This bug is somewhat related:
http://bugs.php.net/bug.php?id=39168&edit=2 .  The functionality is
somewhat non standard for low level implementations.  If the standard
IPC_NOWAIT is added, we can create a user land function that spins in a
loop with usleep to get the desired functionality.


Previous Comments:
------------------------------------------------------------------------

[2009-06-30 20:56:30] sc1n at yahoo dot com

Description:
------------
The PHP sysvsem implementation lacks core functionality for semaphore
usage.  The missing functionality makes tasks that can commonly be
solved with semaphores in other languages not possible in PHP.

Functions that that provide the following behavior should be added:

GETVAL -- Return the value of a single semaphore. (this one is really
important).

GETNCNT -- Return the number of processes waiting for the value of a
semaphore to increase. 

GETZCNT -- Return the number of processes waiting for the value of a
particular semaphore to reach zero. 

GETPID -- Return the PID of the process that performed the last
operation on the semaphore.

The flag IPC_NOWAIT should be added to sem_acquire to set the acquire
has non blocking.

Expected result:
----------------
Minimum level of semaphore support that matches implementations for
virtually any other programming language.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48748&edit=1

Reply via email to