Unit 'exec' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#os4units]

AttemptSemaphore

Try to obtain a Semaphore without blocking

Declaration

Source position: exec.pas line 1815

function AttemptSemaphore(

  SigSem: PSignalSemaphore

):LongBool;

Arguments

SigSem

  

An initialized signal semaphore structure

Function result

True if the semaphore was locked, false if some other task already possessed the semaphore.

Description

Try to obtain a lock on a Semaphore in exclusive mode all other exclusive and shared locks on this semaphore has to be released before. This call is similar to ObtainSemaphore(), except that it will not block if the semaphore could not be locked.

See also

ReleaseSemaphore

  

Make signal semaphore available to others

ObtainSemaphore

  

Gain exclusive access to a semaphore

AttemptSemaphoreShared

  

Try to obtain a Semaphore without blocking in shared mode

ObtainSemaphoreShared

  

Gain access to a semaphore in shared mode


Documentation generated on: 2021-07-30