pthread_setschedparam()

set thread scheduling policy and parameters 

Function


SYNOPSIS

#include <pthread.h>

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


DESCRIPTION

The pthread_setschedparam() function sets the scheduling policy and associated scheduling parameters for the specified thread. Refer to the pthread_attr_setschedpolicy() and pthread_attr_setschedparam() functions for discussions of valid scheduling policy and parameter settings.


PARAMETERS

thread 

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

policy 

Is the new scheduling policy.

param 

Specifies the new scheduling parameters.


RETURN VALUES

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

EINVAL 

policy or param are invalid settings.

EFAULT 

param is an invalid pointer.

ENOTSUP 

policy specifies an unsupported setting.

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_attr_setschedparam(), pthread_attr_setschedpolicy(), pthread_create(), pthread_getschedparam()


PTC MKS Toolkit 10.4 Documentation Build 39.