Searched defs:semaphore (Results 1 - 2 of 2) sorted by relevance

/vbox/src/libs/xpcom18a4/nsprpub/pr/src/bthreads/
H A Dbtsem.c43 ** Create a new semaphore object.
48 PRSemaphore *semaphore; local
52 semaphore = PR_NEWZAP(PRSemaphore);
53 if (NULL != semaphore) {
54 if ((semaphore->sem = create_sem(value, "nspr_sem")) < B_NO_ERROR)
57 return semaphore;
63 ** Destroy the given semaphore object.
82 ** counter value of the semaphore sem is currently greater than 0. If the
83 ** value of semaphore sem is positive, it is decremented by one and the
85 ** the value of semaphore se
[all...]
/vbox/src/libs/xpcom18a4/nsprpub/pr/src/pthreads/
H A Dptsynch.c615 PR_IMPLEMENT(void) PR_PostSem(PRSemaphore *semaphore) argument
620 PR_Lock(semaphore->cvar->lock);
621 PR_NotifyCondVar(semaphore->cvar);
622 semaphore->count += 1;
623 PR_Unlock(semaphore->cvar->lock);
626 PR_IMPLEMENT(PRStatus) PR_WaitSem(PRSemaphore *semaphore)
632 PR_Lock(semaphore->cvar->lock);
633 while ((semaphore->count == 0) && (PR_SUCCESS == status))
634 status = PR_WaitCondVar(semaphore->cvar, PR_INTERVAL_NO_TIMEOUT);
635 if (PR_SUCCESS == status) semaphore
640 PR_DestroySem(PRSemaphore *semaphore) argument
652 PRSemaphore *semaphore; local
[all...]

Completed in 77 milliseconds