SEM_DELETE
Syntax | Arguments | Keywords | Example | Version History | See Also
The SEM_DELETE procedure destroys the reference to the specified semaphore within the current IDL process. (Semaphores themselves are independent of any IDL process.)
SEM_DELETE behaves differently on UNIX and Windows systems:
UNIX Systems
On UNIX systems, a semaphore can exist even if no process has a reference to it. In addition to destroying the reference to the specified semaphore within the current IDL process, SEM_DELETE will schedule the semaphore itself for destruction in the following situations:
- If the semaphore itself was created by the current IDL process, and the DESTROY_SEMAPHORE keyword was not explicitly set equal to zero.
- If the reference to the semaphore was created in the current IDL process with the DESTROY_SEMAPHORE keyword set equal to one.
See DESTROY_SEMAPHORE for additional information.
A semaphore that has been scheduled for destruction will be destroyed when the last process that has a reference to it destroys its reference.
Windows Systems
On Windows systems, a semaphore only exists as long as some process has a reference to it. SEM_DELETE simply destroys the reference to the specified semaphore.
Syntax
SEM_DELETE, strName
Arguments
strName
A scalar string containing the name associated with the semaphore. This is the name used when creating the semaphore with SEM_CREATE.
Note
Semaphore names must be 24 characters or less on Macintosh platforms.
Keywords
None
Example
See SEM_LOCK for an example using this function.
Version History
See Also
SEM_CREATE, SEM_LOCK, SEM_RELEASE