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, tSemaphore type. The fact that a
semaphoreis astructure-objectshould be considered an implementation detail, and may change in the future.
Create a semaphore with the supplied
countandname.
Returns the current count of the semaphore
instance.
Increment the count of
semaphorebyn. If there are threads waiting on this semaphore, thennof them is woken up.