Go to the source code of this file.
Functions | |
| void | change_sem_access_permission (int new_permission) |
| Set default access permissions for the set of semaphores. | |
| int | create_semaphore_set (key_t ipc_key, int number_of_sem) |
| Create a set of semaphores. | |
| int | get_semaphore_set (key_t ipc_key, int number_of_sem) |
| Get a already created (by another process) set of semaphores. | |
| int | set_semaphore_values (int *values) |
| Set semaphores' values (this update the entire set of semaphores). | |
| int | set_semaphore_value (int value, int sem_number) |
| Set the value of one semaphore (and only one of the set). | |
| int | take_sem (int sem_idx) |
| Take one semaphore. This action decrements the semaphore's counter by 1. | |
| int | release_sem (int sem_idx) |
| Release one semaphore. This action increments the semaphore's counter by 1. | |
| int | destroy_semaphore_set () |
| Destroy the set of semaphores. | |
Variables | |
| int | semaphore_set = -1 |
| System identifier for the set of semaphores. | |
| int | set_size = -1 |
| Number of semaphores in the set of semaphores. | |
| int | permission = SEM_PERMISSION |
| Default semaphores' permission used at creation time. | |
Definition in file sem.c.
|
|
Set default access permissions for the set of semaphores.
Definition at line 23 of file sem.c. References permission. |
|
||||||||||||
|
Create a set of semaphores.
Definition at line 40 of file sem.c. References CREATE_SEMAPHORE_CREATE_ERROR, CREATE_SEMAPHORE_OK, CREATE_SEMAPHORE_SET_VAL_ERROR, permission, semaphore_set, and set_size. |
|
|
Destroy the set of semaphores.
Definition at line 215 of file sem.c. References semaphore_set. |
|
||||||||||||
|
Get a already created (by another process) set of semaphores.
Definition at line 87 of file sem.c. References GET_SEM_ALREADY_GET, GET_SEM_ERROR, GET_SEM_OK, get_semaphore_set(), semaphore_set, and set_size. Referenced by get_semaphore_set(). |
|
|
Release one semaphore. This action increments the semaphore's counter by 1.
Definition at line 197 of file sem.c. References semaphore_set. |
|
||||||||||||
|
Set the value of one semaphore (and only one of the set).
Definition at line 149 of file sem.c. References semaphore_set, SET_SEM_VALUES_OK, SET_SEM_VALUES_SEM_NOT_CREATED, SET_SEM_VALUES_SET_ERROR, and set_size. |
|
|
Set semaphores' values (this update the entire set of semaphores).
Definition at line 116 of file sem.c. References semaphore_set, SET_SEM_VALUES_OK, SET_SEM_VALUES_SEM_NOT_CREATED, SET_SEM_VALUES_SET_ERROR, and set_size. |
|
|
Take one semaphore. This action decrements the semaphore's counter by 1.
Definition at line 172 of file sem.c. References semaphore_set. |
1.3-rc1