posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
_POSIX_SHARED_MEMORY_OBJECTS

POSIX Shared Memory Objects option. More...

Functions

int shm_open (const char *name, int oflag, mode_t mode)
 Open or create a shared memory object.
 
int shm_unlink (const char *name)
 Remove a shared memory object.
 

Detailed Description

POSIX Shared Memory Objects option.

Function Documentation

◆ shm_open()

int shm_open ( const char *  name,
int  oflag,
mode_t  mode 
)

Open or create a shared memory object.

Parameters
nameShared memory name (must start with '/').
oflagOpen flags (O_RDONLY, O_RDWR, O_CREAT, O_EXCL, O_TRUNC).
modePermission bits applied if the object is created.
Returns
File descriptor for the shared memory object, or -1 on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/shm_open.html

◆ shm_unlink()

int shm_unlink ( const char *  name)

Remove a shared memory object.

Parameters
nameShared memory name.
Returns
0 on success, or -1 with errno set on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/shm_unlink.html