The POSIX-SEM API is a compatible implementation of the POSIX 1003.1 semaphores API. For general information on this feature, see the POSIX standard (IEEE Std 1003.1 - 1993). This feature is simply a library that might or might not be linked to an application. It is not a feature that can be turned on or off when configuring a system.
The POSIX semaphores API is summarized in the following table. Some of the calls listed are also included in other features:
Function |
Comment |
---|---|
sem_open() |
Open/initialize a semaphore |
sem_close() |
Close a semaphore |
sem_init() |
Initialize a semaphore |
sem_destroy() |
Delete a semaphore |
sem_wait() |
Wait on a semaphore |
sem_trywait() |
Attempt to lock a semaphore |
sem_post() |
Signal a semaphore |
sem_getvalue() |
Get semaphore counter value |
sem_unlink() |
Remove a named semaphore |