Next: Waitqueue/condition variables, Previous: Mutex Support, Up: Threading
described here should be considered experimental, subject to API changes without notice.
Class precedence list:
semaphore, structure-object, t
Semaphore type. The fact that a
semaphore
is astructure-object
should be considered an implementation detail, and may change in the future.
Create a semaphore with the supplied
count
andname
.
Returns the current count of the semaphore
instance
.
Increment the count of
semaphore
byn
. If there are threads waiting on this semaphore, thenn
of them is woken up.