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

POSIX Thread Priority Inheritance option. More...

Macros

#define PTHREAD_PRIO_INHERIT   1
 Mutex protocol: owning thread inherits priority of highest-priority waiter.
 

Functions

int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *ZRESTRICT attr, int *ZRESTRICT protocol)
 Get the protocol attribute of a mutex attributes object.
 
int pthread_mutexattr_setprotocol (pthread_mutexattr_t *attr, int protocol)
 Set the protocol attribute of a mutex attributes object.
 

Detailed Description

POSIX Thread Priority Inheritance option.

Macro Definition Documentation

◆ PTHREAD_PRIO_INHERIT

#define PTHREAD_PRIO_INHERIT   1

Mutex protocol: owning thread inherits priority of highest-priority waiter.

Definition at line 73 of file pthread.h.

Function Documentation

◆ pthread_mutexattr_getprotocol()

int pthread_mutexattr_getprotocol ( const pthread_mutexattr_t *ZRESTRICT  attr,
int *ZRESTRICT  protocol 
)

Get the protocol attribute of a mutex attributes object.

Parameters
attrMutex attributes object.
protocolOutput: PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, or PTHREAD_PRIO_PROTECT.
Returns
0 on success, or a positive error number on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutexattr_getprotocol.html

◆ pthread_mutexattr_setprotocol()

int pthread_mutexattr_setprotocol ( pthread_mutexattr_t *  attr,
int  protocol 
)

Set the protocol attribute of a mutex attributes object.

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