pthread_setschedparam, pthread_getschedparam - dynamic access to thread scheduling
#include <pthread.h>
Both are callable from an ISR.
Thread scheduling is controlled by a relative scheduling priority. Higher priority threads are scheduled before lower priority threads. Priority is inherited across a thread create, however the priority can be modified at creation time by a call to pthread_attr_setschedparam().
The pthread_setschedparam() function sets the scheduling policy and related scheduling priority for the thread ID given by target_thread to the policy and associated priority provided in policy , and the sched_priority member of param , respectively.
No scheduling parameters are changed for the target thread if pthread_setschedparam() fails.
The pthread_getschedparam() function retrieves the scheduling policy and scheduling priority parameters for the thread ID given by target_thread , and then stores the values in policy and the sched_priority member of param , respectively.
Zero is returned upon successful completion; otherwise, an error number is returned.
For each of the following conditions, these functions return an error number if the condition is detected.
pthread_attr_init(), pthread_create()
Currently, the policy value is ignored.