next up previous contents index
Next: 18.3.10 pthread_mutexattr_init: Initialize a Up: 18.3 POSIX Threads Reference Previous: 18.3.8 pthread_attr_setstacksize: Set the

18.3.9 pthread_attr_setschedpolicy: Set the scheduling policy in a thread attributes object

 

SYNOPSIS

#include <oskit/threads/pthread.h>

int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy);

DESCRIPTION

Set the scheduling policy in a previously initialized threads attribute object, for use with pthread_create.

PARAMETERS

attr
A pointer to the pthread_attr_t object representing the attributes for a thread creation.
policy
Either SCHED_FIFO or SCHED_RR.

RETURNS

Returns zero on success. Returns EINVAL if policy is invalid.

RELATED INFORMATION

pthread_create, pthread_attr_init



University of Utah Flux Research Group