Set thread inherit scheduling attribute
#include <pthread.h>
int pthread_attr_setinheritsched(
pthread_attr_t * attr,
int inheritsched );
libc
The pthread_attr_setinheritsched() function sets the thread inherit scheduling attribute in the attribute object attr to inheritsched.
Possible values for inheritsched are:
| Constant | Meaning |
|---|---|
| PTHREAD_INHERIT_SCHED | Thread inherits the scheduling policy of parent thread. |
| PTHREAD_EXPLICIT_SCHED | Thread has the scheduling policy specified in attr. |
The default value of the thread inherit scheduling attribute is PTHREAD_INHERIT_SCHED.
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |
pthread_attr_getinheritsched(), pthread_attr_init(), pthread_create().