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

AddSemaphore

Initialize then add a signal semaphore to the system

Declaration

Source position: exec.pas line 1814

procedure AddSemaphore(

  SigSem: PSignalSemaphore

);

Arguments

SigSem

  

An signal semaphore structure

Description

This function attaches a signal semaphore structure to the system's public signal semaphore list. The name and priority fields of the semaphore structure must be initialized prior to calling this function. If you do not want to let others rendezvous with this semaphore, use InitSemaphore() instead.

If a semaphore has been added to the naming list, you must be careful to remove the semaphore from the list (via RemSemaphore()) before deallocating its memory.

Semaphores that are linked together in an allocation list (which ObtainSemaphoreList() would use) may not be added to the system naming list, because the facilities use the link field of the signal semaphore in incompatible ways

See also

RemSemaphore

  

Remove a signal semaphore from the system

FindSemaphore

  

Find Semaphore by name

InitSemaphore

  

Initialize a signal semaphore


Documentation generated on: 2021-07-30