next up previous contents index
Next: 18.3.41 pthread_setschedparam: Set the Up: 18.3 POSIX Threads Reference Previous: 18.3.39 pthread_self: Return the

18.3.40 pthread_setprio: Change the priority of a thread

 

SYNOPSIS

#include <oskit/threads/pthread.h>

int 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



University of Utah Flux Research Group