Returns the value of the environment variable.
#include <pripcsem.h> NSPR_API(PRStatus) PR_WaitSemaphore(PRSem *sem);
The function has the following parameter:
sem
PRSem
structure returned from a call to PR_OpenSemaphore
.PR_WaitSemaphore
tests the value of the semaphore. If the value of the semaphore is > 0, the value of the semaphore is decremented and the function returns. If the value of the semaphore is 0, the function blocks until the value becomes > 0, then the semaphore is decremented and the function returns.
The "test and decrement" operation is performed atomically.