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_setschedparam function sets the scheduling policy and related scheduling priority for the thread ID given by thread to the policy and associated priority provided in policy, and the sched_priority member of param, respectively.