Go to the source code of this file.
Functions | |
void | change_shm_access_permission (int new_permission) |
Change the SHM's default permissions. | |
int | create_shared_memory_segment (key_t ipc_key, int size) |
Create the shared memory segment. | |
int | get_shared_memory_segment_sys_id (key_t ipc_key, int size) |
Get the system's identifier of a shared memory segment that has already been created (by another process). | |
int | set_shm_auto_destroy () |
Tell the IPC library to destroy the SHM on the last detachement. | |
int | get_shared_memory_segment_id () |
Returns the shared memory segment identifier. | |
SHM_addr | get_shm_address () |
Returns the address used by the process to access the shared memory segment. | |
SHM_addr | attache_shared_memory_segment () |
Attache a previously created shared memory segment. | |
shmid_ds * | get_shm_info () |
Return the data structure that describes the Shared Memory Segment (as documented in man shmget). | |
int | detache_shm () |
Detache the Shared Memory Segment. | |
Variables | |
int | shm_id = -1 |
System isentifier for the shared memory segment. This value is set by create_shared_memory_segment() or get_shared_memory_segment_sys_id(). | |
SHM_addr | attachement_address = (SHM_addr)-1 |
Address used by the process to access the top of the shared memory segment. This value is set by the function attache_shared_memory_segment(). | |
int | permissions = SHM_PERMISSION |
This variable defines the default permission for all newly created SHM. It can be modified using the function change_shm_access_permission(). | |
shmid_ds | shm_info |
Data structure that contains information about the shared memory segment (see nam shmctl). |
Definition in file shm.c.
|
Attache a previously created shared memory segment.
Definition at line 158 of file shm.c. References attachement_address, and shm_id. |
|
Change the SHM's default permissions.
Definition at line 32 of file shm.c. References permissions. |
|
Create the shared memory segment.
Definition at line 51 of file shm.c. References CREATE_SHM_ALREADY_CREATED, CREATE_SHM_ERROR, CREATE_SHM_OK, permissions, and shm_id. |
|
Detache the Shared Memory Segment.
Definition at line 190 of file shm.c. References attachement_address. |
|
Returns the shared memory segment identifier.
Definition at line 137 of file shm.c. References shm_id. |
|
Get the system's identifier of a shared memory segment that has already been created (by another process).
Definition at line 92 of file shm.c. References GET_SHM_ALREADY_GET, GET_SHM_ERROR, GET_SHM_OK, and shm_id. |
|
Returns the address used by the process to access the shared memory segment.
Definition at line 147 of file shm.c. References attachement_address. |
|
Return the data structure that describes the Shared Memory Segment (as documented in man shmget).
Definition at line 174 of file shm.c. References get_shm_info(), shm_id, and shm_info. Referenced by get_shm_info(). |
|
Tell the IPC library to destroy the SHM on the last detachement.
Definition at line 124 of file shm.c. References shm_id. |