#include <oskit/threads/pthread.h>int pthread_setprio(pthread_t tid, int newpri);
Change the priority of a thread. 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 priority should be changed.
- newpri
- The new priority, which must be from PRIORITY_MIN to PRIORITY_MAX.
Returns zero on success. EINVAL if tid specifies an invalid thread or newpri specifies an invalid priority.
pthread_create, sched_yield, pthread_setschedparam