next up previous contents index
Next: 18.3.42 pthread_sleep: Sleep for Up: 18.3 POSIX Threads Reference Previous: 18.3.40 pthread_setprio: Change the

18.3.41 pthread_setschedparam: Set the scheduling parameters for a thread

 

SYNOPSIS

#include <oskit/threads/pthread.h>

int pthread_setschedparam(pthread_t tid, int policy, const struct sched_param *param);

DESCRIPTION

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.

PARAMETERS

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

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

RELATED INFORMATION

pthread_create, sched_yield, pthread_setprio



University of Utah Flux Research Group