Set thread scheduling parameters attribute
#include <pthread.h>
#include <sched.h>
int pthread_attr_setschedparam(
pthread_attr_t * attr,
const struct sched_param * param );
libc
The pthread_attr_setschedparam() function sets the thread scheduling parameters attribute in the thread attribute object attr to param.
The scheduling parameters attribute has the following members:
| Member | Default Value |
|---|---|
| sched_priority | Inherited from parent thread |
The thread scheduling parameters are only used if you have set the thread inherit scheduling attribute to PTHREAD_EXPLICIT_SCHED using pthread_attr_setinheritsched().
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |
pthread_attr_getschedparam(), pthread_attr_setinheritsched(), pthread_attr_init(), pthread_create().