[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'Exec' (#aros)


Make signal semaphore available to others


Source position: exec.pas line 1303

procedure ReleaseSemaphore(

  SigSem: PSignalSemaphore





An initialized signal semaphore structure which was obtained before


ReleaseSemaphore() is the inverse of ObtainSemaphore(). It makes the semaphore lockable to other users. If tasks are waiting for the semaphore and this this task is done with the semaphore then the next waiting task is signalled.

Each ObtainSemaphore() call must be balanced by exactly one ReleaseSemaphore() call. This is because there is a nesting count maintained in the semaphore of the number of times that the current task has locked the semaphore. The semaphore is not released to other tasks until the number of releases matches the number of obtains.

Signal semaphores locked via ObtainSemaphoreShared are also released with this function.

Semaphores must released the same amount as is obtained.

See also



Initialize a signal semaphore



Gain exclusive access to a semaphore



Gain access to a semaphore in shared mode

Documentation generated on: 2017-01-10