[Previous] [Contents] [Next]

pthread_attr_setinheritsched()

Set thread inherit scheduling attribute

Synopsis:

#include <pthread.h>

int pthread_attr_setinheritsched(
                    pthread_attr_t * attr,
                    int inheritsched );

Library:

libc

Description:

The pthread_attr_setinheritsched() function sets the thread inherit scheduling attribute in the attribute object attr to inheritsched.

Possible values for inheritsched are:

Constant Meaning
PTHREAD_INHERIT_SCHED Thread inherits the scheduling policy of parent thread.
PTHREAD_EXPLICIT_SCHED Thread has the scheduling policy specified in attr.

The default value of the thread inherit scheduling attribute is PTHREAD_INHERIT_SCHED.

Returns:

EOK
Success.
EINVAL
Invalid thread attribute object attr.
ENOTSUP
Invalid thread inherit scheduling attribute inheritsched.

Classification:

POSIX 1003.1 (Threads)

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

See also:

pthread_attr_getinheritsched(), pthread_attr_init(), pthread_create().


[Previous] [Contents] [Next]