next up previous contents index
Next: 18.3.6 pthread_attr_setstackaddr: Set the Up: 18.3 POSIX Threads Reference Previous: 18.3.4 pthread_attr_setdetachstate: Set the

18.3.5 pthread_attr_setprio: Set the priority in a thread attributes object

 

SYNOPSIS

#include <oskit/threads/pthread.h>

int pthread_attr_setprio(pthread_attr_t *attr, int pri);

DESCRIPTION

Set the priority value 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.
pri
A value between PRIORITY_MIN and PRIORITY_MAX.

RETURNS

Returns zero on success. Returns EINVAL if priority is outside the range of PRIORITY_MIN to PRIORITY_MAX.

RELATED INFORMATION

pthread_create, pthread_attr_init, pthread_attr_setstacksize



University of Utah Flux Research Group