[Previous] [Contents] [Next]

pthread_attr_setschedparam()

Set thread scheduling parameters attribute

Synopsis:

#include <pthread.h>
#include <sched.h>

int pthread_attr_setschedparam(
            pthread_attr_t * attr,
            const struct sched_param * param );

Library:

libc

Description:

The pthread_attr_setschedparam() function sets the thread scheduling parameters attribute in the thread attribute object attr to param.

The scheduling parameters attribute has the following members:

Member Default Value
sched_priority Inherited from parent thread

The thread scheduling parameters are only used if you have set the thread inherit scheduling attribute to PTHREAD_EXPLICIT_SCHED using pthread_attr_setinheritsched().

Errors:

EOK
Success.
EINVAL
Invalid thread attribute object attr.
ENOTSUP
Invalid thread scheduling parameters attribute param.

Classification:

POSIX 1003.1 (Threads)

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

pthread_attr_getschedparam(), pthread_attr_setinheritsched(), pthread_attr_init(), pthread_create().


[Previous] [Contents] [Next]