pthread_getschedparam()

get thread scheduling policy and parameters 

Function


SYNOPSIS

#include <pthread.h>

int pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param);


DESCRIPTION

The pthread_getschedparam() function gets the scheduling policy and scheduling parameters for the specified thread, and stores those values is policy and param, respectively. The priority value returned from pthread_getschedparam() is the value specified by the most recent pthread_setschedparam() or pthread_create() call affecting the target thread.


PARAMETERS

thread 

Is the ID of the thread whose scheduling parameters are to be obtained.

policy 

Is the location where the scheduling policy value is to be stored.

param 

Points to a structure where the current scheduling parameters is to be stored.


RETURN VALUES

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

EINVAL 

The locations pointed to by policy or param point are not writable.

EFAULT 

policy or param is an invalid pointer.

ESRCH 

thread does not specify a currently running thread in the process.


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_create(), pthread_setschedparam()


PTC MKS Toolkit 10.4 Documentation Build 39.