Multithreaded Programming Guide

Get Inherited Scheduling Policy


pthread_attr_getinheritsched(3T) returns the scheduling policy set by pthread_attr_setinheritsched().


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.


The parameter inherit is NULL or tattr is invalid.