Creates a semaphore.
a0tError a0NewSemaphore( | | | |
| a0tSemaphore | *semaphore, | |
| int | initial );
| |
Name | rd/wr | Description |
semaphore | write | Semaphore descriptor to fill. |
initial | read | Initial semaphore counter value. |
This routine creates a semaphore descriptor and initialize the semaphore counter with the integer value initial. This value may be any integer value.
On return of this function, the variable pointed by semaphore contains a semaphore descriptor.
Error Code | Description |
A0Err...Some error occurred. | |
A0ErrOkSuccessful completion. | |
a0PSemaphore() a0VSemaphore() a0TryPSemaphore() a0DisposeSemaphore()