Performs P on a semaphore.
a0tError a0PSemaphore( | | | |
| a0tSemaphore | *semaphore );
| |
Name | rd/wr | Description |
semaphore | write | Semaphore descriptor to operate. |
This routine blocks the thread if the counter associated with the semaphore is zero or negative. If the counter is positive, the thread doesn't block. When the thread in unblocked, or if the thread has not blocked, the counter is decremented.
Error Code | Description |
A0Err...Some error occurred. | |
A0ErrOkSuccessful completion. | |
a0NewSemaphore() a0DisposeSemaphore() a0TryPSemaphore() a0VSemaphore()