Get a List of semaphores
Source position: exec.pas line 2067
procedure ObtainSemaphoreList( |
sigSem: PList |
); |
sigSem |
|
A list of signal semaphores |
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
|
Gain access to a semaphore in shared mode |
|
|
Initialize a signal semaphore |
|
|
Make signal semaphore available to others |
|
|
Try to obtain a Semaphore without blocking |
|
|
Gain exclusive access to a semaphore |
|
|
Asynchron locking of a semaphore |
|
|
Release a bidMessage from Procure() |