pthread_attr_getinheritsched(3THR) returns the scheduling policy set by pthread_attr_setinheritsched().
Prototype: int pthread_attr_getinheritsched(pthread_attr_t *tattr, int *inherit);
#include <pthread.h> pthread_attr_t tattr; int inherit; int ret; /* get scheduling policy and priority of the creating thread */ ret = pthread_attr_getinheritsched (&tattr, &inherit);
pthread_attr_getinheritsched() returns zero after completing successfully. Any other return value indicates that an error occurred. If the following condition occurs, the function fails and returns the corresponding value.