posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
_POSIX_SHARED_MEMORY_OBJECTS
Implementation completeness: 100.0%100IMPLLine coverage: 77.7%78COV

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 
)
shm_open line coverage: 72.9%73

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)
shm_unlink line coverage: 85.7%86

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