[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


cma_attr_set_sched

Changes the scheduling policy attribute of thread creation.

Syntax

cma_attr_set_sched(
                    attr,
                    policy,
                    priority);
 


Argument Data Type Access

attr opaque cma_t_attr read policy opaque cma_t_sched_ read policy priority opaque cma_t_priority read


C Binding

#include 

void cma_attr_set_sched ( cma_t_attr *attr, cma_t_sched_policy policy, cma_t_priority priority);

Arguments

attr
Handle of the attributes object modified.
policy
New value for the scheduling policy attribute. Valid values are as follows:
   cma_c_sched_fifo
   cma_c_sched_rr
   cma_c_sched_throughput
   cma_c_sched_background

See Section 2.2.3.2 for a description of the scheduling policies.

priority
New value for the priority attribute. The priority attribute is dependent upon scheduling policy. Valid values are as follows:
Low               Mid               High

cma_c_prio_fifo_ cma_c_prio_fifo_ cma_c_prio_fifo_max min mid cma_c_prio_rr_ cma_c_prio_rr_ cma_c_prio_rr_max min mid cma_c_prio_ cma_c_prio_ cma_c_prio_through_max through_min through_mid cma_c_prio_back_ cma_c_prio_back_ cma_c_prio_back_max min mid


The default priority is cma_c_prio_default_mid. (This symbol maps to cma_c_prio_through_mid.)

Description

This routine sets the scheduling policy and priority of a thread that is created using the attributes object specified by the attr argument. The default value of the scheduling policy attribute is cma_c_sched_default. (This symbol is mapped to the cma_c_sched_throughput scheduling policy.) The default scheduling priority is the midrange of the default scheduling policy.

Note
You must set scheduling inheritance to cma_c_sched_use_default if you want to create threads with a scheduling policy or priority different from the creating thread.

Exceptions

cma_e_badparam
cma_e_existence
cma_e_use_error



[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]