pthread_attr_setinheritsched()

set scheduling parameter inheritance state attribute 

Function


SYNOPSIS

#include <pthread.h>

int pthread_attr_setinheritsched(pthread_attr_t *attr, int inheritsched);


DESCRIPTION

The pthread_attr_setinheritsched() function sets the scheduling parameter inheritance state attribute in the specified attribute object. The thread's scheduling parameter inheritance state determines whether scheduling parameters are explicitly specified in this attribute object, or if scheduling attributes should be inherited from the creating thread. Valid settings for inheritsched include:

PTHREAD_EXPLICIT_SCHED 

Scheduling parameters for the newly created thread are specified in the thread attribute object.

PTHREAD_INHERIT_SCHED 

Scheduling parameters for the newly created thread are the same as those of the creating thread.


PARAMETERS

attr 

Is a thread attribute object.

inheritsched 

Is the thread scheduling parameter inheritance state attribute value; one of the values specified in the DESCRIPTION section.


RETURN VALUES

On success, pthread_attr_setinheritsched() returns 0. On error, one of the following values is returned:

EINVAL 

attr is not an initialized thread attribute object, or inheritsched is not a valid scheduling parameter inheritance state setting.

EFAULT 

attr is an invalid pointer.


CONFORMANCE

POSIX P1003.1 (1996)


MULTITHREAD SAFETY LEVEL

MT-safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
pthread_attr_getinheritsched(), pthread_attr_init(), pthread_attr_setschedparam(), pthread_attr_setschedpolicy(), pthread_attr_setscope(), pthread_create()


PTC MKS Toolkit 10.4 Documentation Build 39.