The pthread_setschedparam and pthread_getschedparam functions allow the scheduling policy and scheduling priority parameters to be set and retrieved for individual threads.
The pthread_getschedparam function retrieves the scheduling policy and scheduling priority parameters for the thread ID given by thread, and then stores the values in the policy and sched_priority member of param, respectively.