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

POSIX Thread Process-Shared Synchronization option (placeholder). More...

Macros

#define PTHREAD_PROCESS_SHARED   1
 Mutex or barrier attribute: object is shared between processes.
 
#define PTHREAD_PROCESS_PRIVATE   0
 Mutex or barrier attribute: object is private to the process (default).
 

Functions

int pthread_condattr_getpshared (const pthread_condattr_t *ZRESTRICT attr, int *ZRESTRICT pshared)
 Get the process-shared attribute of a condition variable attributes object.
 
int pthread_condattr_setpshared (pthread_condattr_t *attr, int pshared)
 Set the process-shared attribute of a condition variable attributes object.
 
int pthread_mutexattr_getpshared (const pthread_mutexattr_t *ZRESTRICT attr, int *ZRESTRICT pshared)
 Get the process-shared attribute of a mutex attributes object.
 
int pthread_mutexattr_setpshared (pthread_mutexattr_t *attr, int pshared)
 Set the process-shared attribute of a mutex attributes object.
 

Detailed Description

POSIX Thread Process-Shared Synchronization option (placeholder).

See also
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_subprofiles.html
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_subprofiles.html

Macro Definition Documentation

◆ PTHREAD_PROCESS_PRIVATE

#define PTHREAD_PROCESS_PRIVATE   0

Mutex or barrier attribute: object is private to the process (default).

Definition at line 87 of file pthread.h.

◆ PTHREAD_PROCESS_SHARED

#define PTHREAD_PROCESS_SHARED   1

Mutex or barrier attribute: object is shared between processes.

Definition at line 85 of file pthread.h.

Function Documentation

◆ pthread_condattr_getpshared()

int pthread_condattr_getpshared ( const pthread_condattr_t *ZRESTRICT  attr,
int *ZRESTRICT  pshared 
)

Get the process-shared attribute of a condition variable attributes object.

Parameters
attrCondition variable attributes object.
psharedOutput: PTHREAD_PROCESS_SHARED or PTHREAD_PROCESS_PRIVATE.
Returns
0 on success, or a positive error number on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_condattr_getpshared.html

◆ pthread_condattr_setpshared()

int pthread_condattr_setpshared ( pthread_condattr_t *  attr,
int  pshared 
)

Set the process-shared attribute of a condition variable attributes object.

Parameters
attrCondition variable attributes object.
psharedPTHREAD_PROCESS_SHARED or PTHREAD_PROCESS_PRIVATE.
Returns
0 on success, or a positive error number on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_condattr_setpshared.html

◆ pthread_mutexattr_getpshared()

int pthread_mutexattr_getpshared ( const pthread_mutexattr_t *ZRESTRICT  attr,
int *ZRESTRICT  pshared 
)

Get the process-shared attribute of a mutex attributes object.

Parameters
attrMutex attributes object.
psharedOutput: PTHREAD_PROCESS_SHARED or PTHREAD_PROCESS_PRIVATE.
Returns
0 on success, or a positive error number on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutexattr_getpshared.html

◆ pthread_mutexattr_setpshared()

int pthread_mutexattr_setpshared ( pthread_mutexattr_t *  attr,
int  pshared 
)

Set the process-shared attribute of a mutex attributes object.

Parameters
attrMutex attributes object.
psharedPTHREAD_PROCESS_SHARED or PTHREAD_PROCESS_PRIVATE.
Returns
0 on success, or a positive error number on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutexattr_setpshared.html