Multithreaded Programming Guide

pthread_attr_getinheritsched(3THR)

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); 

Return Values

Returns zero after completing successfully. Any other returned value indicates that an error occurred. If the following condition occurs, the function fails and returns the corresponding value.


EINVAL

The parameter inherit is NULL or tattr is invalid.