Changes the scheduling policy attribute of thread creation.
pthread_attr_setsched( attr, scheduler );
Argument Data Type Accessattr opaque pthread_attr_t read scheduler integer read
int pthread_attr_setsched ( pthread_attr_t *attr, int scheduler);
SCHED_FIFO SCHED_RR SCHED_FG_NP or SCHED_OTHER SCHED_BG_NP
See Section 2.2.3.2 for a description of the scheduling policies.
By default, a created thread inherits the priority of the thread calling pthread_create. To specify a priority using this routine, scheduling inheritance must be disabled at the time the thread is created. Call pthread_attr_setinheritsched and specify the value PTHREAD_DEFAULT_SCHED for the inherit argument before calling pthread_create.
Return Error Description0 Successful completion. -1 [EINVAL] The value specified by scheduler is invalid.