Changes the current priority of a thread.
cma_thread_set_priority( thread, priority);
Argument Data Type Accessthread opaque cma_t_thread read priority opaque cma_t_priority read
#includevoid cma_thread_set_priority ( cma_t_thread *thread, cma_t_priority priority);
Low Mid Highcma_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.)
Changing the priority of a thread can cause it to start executing or to be preempted by another thread. The exact effect of setting different priority values depends on the scheduling priority assigned to the thread. The scheduling priority is set by calling the cma_attr_set_priority routine.
An application should specify priority only to express the urgency of executing the thread relative to other threads. Priority should not be used to control mutual exclusion when accessing shared data. With a sufficient number of processors executing, all ready threads, regardless of priority, can be executing simultaneously.
This routine is different from cma_attr_set_priority in that cma_ attr_set_ priority sets the priority attribute that is used to establish the priority of a new thread when it is created. However, this routine changes the priority of an existing thread.
cma_e_badparam cma_e_existence cma_e_unimp cma_e_use_error exc_e_nopriv