pthread_setschedparam, pthread_getschedparam - control thread scheduling
parameters
#include <pthread.h>
int pthread_setschedparam(pthread_t target_thread, int policy, const struct sched_param *param);
int pthread_getschedparam(pthread_t target_thread, int *policy, struct sched_param *param);
pthread_setschedparam sets the scheduling parameters for the thread target_thread as indicated by policy and param. policy can be either SCHED_OTHER (regular, non-real-time scheduling), SCHED_RR (real-time, round-robin) or SCHED_FIFO (real-time, first-in first-out). param specifies the scheduling priority for the two real-time policies.
Pthreads-w32 only supports SCHED_OTHER and does not support the real-time scheduling policies SCHED_RR and SCHED_FIFO.
pthread_getschedparam retrieves the scheduling policy and scheduling parameters for the thread target_thread and stores them in the locations pointed to by policy and param, respectively.
pthread_setschedparam and pthread_getschedparam return 0 on success and a non-zero error code on error.
On error, pthread_setschedparam returns the following error codes:
On error, pthread_getschedparam returns the following error codes:
Xavier Leroy <Xavier.Leroy@inria.fr>
Modified by Ross Johnson for use with Pthreads-w32.
sched_setscheduler(2) , sched_getscheduler(2) , sched_getparam(2) , pthread_attr_setschedpolicy(3) , pthread_attr_setschedparam(3) .