pthread_attr_getinheritsched Subroutine Purpose Returns the value of the inheritsched attribute of a thread attributes object. Library Threads Library (libpthreads.a) Syntax #include
int pthread_attr_getinheritsched (attr, inheritsched) const pthread_attr_t *attr; int *inheritsched; Description The pthread_attr_getinheritsched subroutine returns the value of the inheritsched attribute of the thread attributes object attr. This attribute specifies the inheritance of scheduling properties for the thread created with this attributes object. It may have one of the following values: PTHREAD_EXPLICIT_SCHED Specifies that the thread will take the scheduling properties specified in its attribute object. PTHREAD_INHERIT_SCHED Specifies that the thread will inherit the scheduling properties from its creating thread. This is the default value. Note: The pthread.h header file must be the first included file of each source file using the threads library. Parameters attr Specifies the thread attributes object. inheritsched Points to where the inheritsched attribute value will be stored. Return Values Upon successful completion, the value of the inheritsched attribute is returned via the inheritsched parameter, and 0 is returned. Otherwise, an error code is returned. Error Codes The pthread_attr_getinheritsched subroutine is unsuccessful if the following is true: EINVAL The attr parameter is not valid. ENOSYS The priority scheduling POSIX option is not implemented. Implementation Specifics This subroutine is part of the Base Operating System (BOS) Runtime. The implementation of this subroutine is dependent on the priority scheduling POSIX option. The priority scheduling POSIX option is implemented in AIX. Related Information The pthread_attr_setinheritsched subroutine, pthread_attr_init subroutine. Threads Scheduling. Threads Library Options and Threads Library Quick Reference.