Unit 'EXEC' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#amunits]

ObtainSemaphoreList

Get a List of semaphores

Declaration

Source position: exec.pas line 1254

procedure ObtainSemaphoreList(

  sigSem: pList

);

Arguments

sigSem

  

A list of signal semaphores

Description

Signal semaphores may be linked together into a list. This function takes a list of these semaphores and attempts to lock all of them at once. This call is preferable to applying ObtainSemaphore() to each element in the list because it attempts to lock all the elements simultaneously, and won't deadlock if someone is attempting to lock in some other order.

This function assumes that only one task at a time will attempt to lock the entire list of semaphores. In other words, there needs to be a higher level lock (perhaps another signal semaphore...) that is used before someone attempts to lock the semaphore list via ObtainSemaphoreList().

Note that deadlocks may result if this call is used AND someone attempts to use ObtainSemaphore() to lock more than one semaphore on the list. If you wish to lock more than one semaphore (but not all of them) then you should obtain the higher level lock

See also

ObtainSemaphoreShared

  

Gain access to a semaphore in shared mode

InitSemaphore

  

Initialize a signal semaphore

ReleaseSemaphore

  

Make signal semaphore available to others

AttemptSemaphore

  

Try to obtain a Semaphore without blocking

ObtainSemaphore

  

Gain exclusive access to a semaphore

Procure

  

Asynchron locking of a semaphore

Vacate

  

Release a bidMessage from Procure()


Documentation generated on: 2021-07-30