![]() |
![]() |
![]() |
Set thread scheduling policy attribute
#include <pthread.h> #include <sched.h> int pthread_attr_setschedpolicy( pthread_attr_t* attr, int policy );
libc
The pthread_attr_setschedpolicy() function sets the thread scheduling policy attribute in the thread attribute object attr to policy.
The thread scheduling policy attribute can have the following values:
The policy attribute is 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_getschedpolicy(), pthread_attr_init(), pthread_create().
![]() |
![]() |
![]() |