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

POSIX Thread Priority Protection option. More...

Macros

#define PTHREAD_PRIO_PROTECT   2
 Mutex protocol: owner runs at ceiling priority while holding the mutex.
 

Functions

int pthread_mutex_getprioceiling (const pthread_mutex_t *ZRESTRICT mutex, int *ZRESTRICT prioceiling)
 Get the priority ceiling of a mutex.
 
int pthread_mutex_setprioceiling (pthread_mutex_t *ZRESTRICT mutex, int prioceiling, int *ZRESTRICT old_ceiling)
 Set the priority ceiling of a mutex.
 
int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *ZRESTRICT attr, int *ZRESTRICT prioceiling)
 Get the priority ceiling attribute of a mutex attributes object.
 
int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *attr, int prioceiling)
 Set the priority ceiling attribute of a mutex attributes object.
 

Detailed Description

POSIX Thread Priority Protection option.

Macro Definition Documentation

◆ PTHREAD_PRIO_PROTECT

#define PTHREAD_PRIO_PROTECT   2

Mutex protocol: owner runs at ceiling priority while holding the mutex.

Definition at line 82 of file pthread.h.

Function Documentation

◆ pthread_mutex_getprioceiling()

int pthread_mutex_getprioceiling ( const pthread_mutex_t *ZRESTRICT  mutex,
int *ZRESTRICT  prioceiling 
)

Get the priority ceiling of a mutex.

Parameters
mutexMutex to query.
prioceilingOutput: priority ceiling value.
Returns
0 on success, or a positive error number on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_getprioceiling.html

◆ pthread_mutex_setprioceiling()

int pthread_mutex_setprioceiling ( pthread_mutex_t *ZRESTRICT  mutex,
int  prioceiling,
int *ZRESTRICT  old_ceiling 
)

Set the priority ceiling of a mutex.

Parameters
mutexMutex to update.
prioceilingNew priority ceiling value.
old_ceilingOutput: previous priority ceiling, or NULL.
Returns
0 on success, or a positive error number on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_setprioceiling.html

◆ pthread_mutexattr_getprioceiling()

int pthread_mutexattr_getprioceiling ( const pthread_mutexattr_t *ZRESTRICT  attr,
int *ZRESTRICT  prioceiling 
)

Get the priority ceiling attribute of a mutex attributes object.

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

◆ pthread_mutexattr_setprioceiling()

int pthread_mutexattr_setprioceiling ( pthread_mutexattr_t *  attr,
int  prioceiling 
)

Set the priority ceiling attribute of a mutex attributes object.

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