Locks a semaphore.
int32 LockSemaphore( Item s, uint32 flags )
This procedure locks a semaphore. For information about semaphores, which are used to control access to shared resources, see the “Sharing System Resources” chapter in the 3DO System Programmer's Guide.
Only one flag is currently defined:
The procedure returns 1 if the semaphore was successfully locked. If the semaphore is already locked and the SEM_WAIT flag is not set (which indicates that the calling task does not want to wait until the semaphore is available), the procedure returns 0. If an error occurs, the procedure returns an error code.
SWI implemented in kernel folio V20.
This is the same SWI as LockItem()
.
There are currently no asynchronous locks or shared read locks.
FindSemaphore
(), UnlockSemaphore()