sem_wait


sem_wait

Wait on a semaphore.

Signature

Status sem_wait(
	Capref	sem )

Arguments

Semantics

This call is used decrement the count of the semaphore sem. If the count is positive prior to the call, the count is decremented and the operation succeeds immediately. If the count is zero or negative prior to the call, the count is decremented and the calling locus is blocked until another locus performs a sem_signal operation on sem. When it is awakened, the operation succeeds.

Status

See Also

Capref

Loci

sem_signal