SYNOPSIS
#include <pthread.h>
int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy);
DESCRIPTION
The
- SCHED_FIFO
-
Threads are scheduled in a first-in-first-out order within each priority.
- SCHED_OTHER
-
Scheduling behavior is determined by the operating system.
- SCHED_RR
-
Threads are scheduled in a round-robin fashion within each priority.
The specified scheduling policy will only be used if the scheduling parameter inheritance attribute is PTHREAD_EXPLICIT_SCHED.
PARAMETERS
- attr
-
Is a thread attribute object.
- policy
-
Is the thread scheduling policy attribute value; one of the values specified in the DESCRIPTION section.
RETURN VALUES
On success,
- EINVAL
-
attr is not an initialized thread attribute object, or policy does not specify a valid scheduling policy-setting.
- EFAULT
-
attr is an invalid pointer.
- ENOTSUP
-
policy was set to SCHED_FIFO or SCHED_RR.
CONFORMANCE
POSIX P1003.1 (1996)
MULTITHREAD SAFETY LEVEL
MT-safe.
PORTING ISSUES
The SCHED_FIFO and SCHED_RR scheduling policies are currently not supported; if either of these values is specified, the function returns ENOTSUP.
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_getschedpolicy() ,pthread_attr_init() ,pthread_attr_setinheritsched() ,pthread_attr_setschedparam() ,pthread_create()
PTC MKS Toolkit 10.4 Documentation Build 39.