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

POSIX Robust Mutexes option group (placeholder). More...

Macros

#define PTHREAD_MUTEX_ROBUST   4
 Robust mutex; the state is recoverable if the owner dies.
 
#define PTHREAD_MUTEX_STALLED   1
 Mutex is not recovered on owner death (default, for non-robust mutexes).
 

Functions

int pthread_mutex_consistent (pthread_mutex_t *mutex)
 Mark a robust mutex as consistent after recovering from owner death.
 
int pthread_mutexattr_getrobust (const pthread_mutexattr_t *ZRESTRICT attr, int *ZRESTRICT robust)
 Get the robustness attribute of a mutex attributes object.
 
int pthread_mutexattr_setrobust (pthread_mutexattr_t *attr, int robust)
 Set the robustness attribute of a mutex attributes object.
 

Detailed Description

POSIX Robust Mutexes option group (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_MUTEX_ROBUST

#define PTHREAD_MUTEX_ROBUST   4

Robust mutex; the state is recoverable if the owner dies.

Definition at line 66 of file pthread.h.

◆ PTHREAD_MUTEX_STALLED

#define PTHREAD_MUTEX_STALLED   1

Mutex is not recovered on owner death (default, for non-robust mutexes).

Definition at line 68 of file pthread.h.

Function Documentation

◆ pthread_mutex_consistent()

int pthread_mutex_consistent ( pthread_mutex_t *  mutex)

Mark a robust mutex as consistent after recovering from owner death.

Parameters
mutexRobust mutex to mark consistent.
Returns
0 on success, or a positive error number on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_consistent.html

◆ pthread_mutexattr_getrobust()

int pthread_mutexattr_getrobust ( const pthread_mutexattr_t *ZRESTRICT  attr,
int *ZRESTRICT  robust 
)

Get the robustness attribute of a mutex attributes object.

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

◆ pthread_mutexattr_setrobust()

int pthread_mutexattr_setrobust ( pthread_mutexattr_t *  attr,
int  robust 
)

Set the robustness attribute of a mutex attributes object.

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