next up previous contents index
Next: 27.4.4 osenv_process_lock: Lock the Up: 27.4 Oskit API Extensions Previous: 27.4.2 oskit_pthread_wakeup: Wakeup a

27.4.3 oskit_pthread_setprio: Change the priority of a thread

 

SYNOPSIS

#include <oskit/threads/pthread.h>

int oskit_pthread_setprio(pthread_t tid, int newpri);

DESCRIPTION

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.

PARAMETERS

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

Returns zero on success. EINVAL if tid specifies an invalid thread or newpri specifies an invalid priority.

RELATED INFORMATION

pthread_create, sched_yield, pthread_setschedparam



Utah Flux Research Group