#include <oskit/threads/pthread.h>int pthread_setschedparam(pthread_t tid, int policy, const struct sched_param *param);
Change the scheduling parameters for a thread. The thread's scheduling policy and priority are changed. If the change causes a thread to have a higher priority than the currently running thread, a reschedule operation is performed.
- tid
- The thread identifier of the thread whose scheduling parameters should be changed.
- policy
- The new scheduling policy, as defined in pthread.h
- param
- A pointer to the sched_param_t object representing the new scheduling parameters.
Returns zero on success. EINVAL if tid specifies an invalid thread or policy specifies an invalid policy.
pthread_create, sched_yield, pthread_setprio