Open System Services System Calls Reference Manual (G06.28+, H06.05+)
pthread_getschedparam(2) OSS System Calls Reference Manual
NAME
pthread_getschedparam
- Obtains the current scheduling policy and scheduling parameters of a
thread
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
int pthread_getschedparam(
pthread_t thread,
int *policy,
struct sched_param *param );
PARAMETERS
thread specifies the thread whose scheduling policy and parameters are obtained.
policy receives the value of the scheduling policy for the thread specified by the thread
parameter. See the pthread_setschedparam(2) reference page either online or
in the Open System Services System Calls Reference Manual for valid parameter
values and their meanings.
param Receives the value of the scheduling parameters for the thread specified by the
thread parameter. See the pthread_setschedparam(2) reference page either
online or in the Open System Services System Calls Reference Manual for valid
values.
DESCRIPTION
This function obtains both the current scheduling policy and associated scheduling parameters of
the thread specified by the thread parameter.
The priority value returned in the structure specified by the param parameter is the value
specified in the attr parameter passed to the pthread_create() function or by the most recent call
to the pthread_setschedparam() function that affected this thread.
NOTES
This function differs from the pthread_attr_getschedpolicy( ) and
pthread_attr_getschedparam() functions, which get the scheduling policy and parameters that
are used to establish the priority and scheduling policy of a new thread when it is created.
pthread_getschedparam() obtains the scheduling policy and parameters of an existing thread.
RETURN VALUES
If an error condition occurs, this function returns an integer value indicating the type of error.
Possible return values ares:
0 Successful completion.
[ESRCH] The thread parameter does not refer to an existing thread.
RELATED INFORMATION
Functions: pthread_attr_getschedparam(2), pthread_attr_getschedpolicy(2),
pthread_create(2), pthread_self(2), pthread_setschedparam(2).
5−76 Hewlett-Packard Company 527186-007