September 2001
Intermediate to advanced
768 pages
32h 45m
English
int sem_get(int key, [int max_acquire], [int permissions])
| key | Key of the semaphore for which to get an ID |
| max_acquire | Maximum number of processes that can acquire this semaphore simultaneously |
| permissions | Permissions for the semaphore |
Returns an identifier for the semaphore with the given key.
Returns:
Semaphore ID if successful; FALSE otherwise
Description:
sem_get() creates and returns an identifier that can be used to access the semaphore whose key is given in key . This semaphore can then be simultaneously acquired by at most the number of processes defined by max_acquire , which defaults to 1. The semaphore will have the permissions given by the permissions parameter, which defaults to 0666.
key is a unique integer identifier ...
Read now
Unlock full access