Open System Services System Calls Reference Manual (G06.25+, H06.03+)

pthread_attr_setschedpolicy(2) OSS System Calls Reference Manual
NAME
pthread_attr_setschedpolicy
- Sets the scheduling policy attribute of a thread attributes object
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy );
PARAMETERS
attr species the address of the thread attributes object whose scheduling policy
attribute is to be set.
policy species the new value for the scheduling policy attribute. Valid values are:
SCHED_FIFO is the default value and the only value supported.
DESCRIPTION
This function sets the value of the scheduling policy attribute of the thread attributes object
specied by the attr parameter to the value specied by the policy attribute. The only supported
policy is SCHED_FIFO. An attempt to change this value returns the value of [ENOTSUP] for
this function.
NOTES
Never attempt to use scheduling as a mechanism for synchronization.
RETURN VALUES
If an error condition occurs, this function returns an integer value indicating the type of error.
Possible return values are:
0 Successful completion.
[EINVAL] The value specied by the policy parameter is invalid.
[ENOTSUP] An attempt was made to set the scheduling policy to an unsupported value.
RELATED INFORMATION
Functions: pthread_attr_init(2), pthread_attr_getschedpolicy(2),
pthread_attr_setinheritsched(2), pthread_attr_setschedparam(2), pthread_create(2).
STANDARDS CONFORMANCE
This function is an extension to the XPG4 Version 2 specication. Interfaces documented on this
reference page conform to the following industry standards:
IEEE Std 1003.1c-1995, POSIX System Application Program Interface
The use of the header le spthread.h is an HP exception to the POSIX standard.
536 Hewlett-Packard Company 527186-003