Files | |
file | cb_ipcshmem.h |
Shared memory IPC utility functions. | |
Functions | |
void * | cb_get_shared_mem (int *memfd, const char *shmname, size_t size, int flag) |
get new shared memory More... | |
int | cb_close_shared_mem (void *mem, int *memfd, const char *shmname, size_t size, bool unlink) |
close shared memory More... | |
void* cb_get_shared_mem | ( | int * | memfd, |
const char * | shmname, | ||
size_t | size, | ||
int | flag | ||
) |
get new shared memory
memfd | shared memory file descriptor |
shmname | shared memory name to be used for shm_open |
size | size of shared memroy |
flag | flag to be used for shm_open i.e O_RDONLY, O_RDWR, O_WRONLY, O_CREAT, O_EXCL,O_TRUNC. |
man
shm_open()
. int cb_close_shared_mem | ( | void * | mem, |
int * | memfd, | ||
const char * | shmname, | ||
size_t | size, | ||
bool | unlink | ||
) |
close shared memory
mem | mapped shared memory |
memfd | shared memory file descriptor |
shmname | shared memory name |
size | size of shared memory |
unlink | flag indicating if shared memory will be unlinked |