23 #ifndef _RTEMS_SCORE_SCHEDULERNODEIMPL_H 24 #define _RTEMS_SCORE_SCHEDULERNODEIMPL_H 41 #define SCHEDULER_NODE_OF_WAIT_PRIORITY_NODE( node ) \ 42 RTEMS_CONTAINER_OF( node, Scheduler_Node, Wait.Priority.Node.Node.Chain ) 44 #define SCHEDULER_NODE_OF_WAIT_PRIORITY( node ) \ 45 RTEMS_CONTAINER_OF( node, Scheduler_Node, Wait.Priority ) 51 #define SCHEDULER_PRIORITY_APPEND_FLAG 1 56 #define SCHEDULER_PRIORITY_MAP( priority ) ( ( priority ) << 1 ) 61 #define SCHEDULER_PRIORITY_UNMAP( priority ) ( ( priority ) >> 1 ) 66 #define SCHEDULER_PRIORITY_PURIFY( priority ) \ 67 ( ( priority ) & ~( (Priority_Control) SCHEDULER_PRIORITY_APPEND_FLAG ) ) 72 #define SCHEDULER_PRIORITY_APPEND( priority ) \ 73 ( ( priority ) | SCHEDULER_PRIORITY_APPEND_FLAG ) 80 #define SCHEDULER_PRIORITY_IS_APPEND( priority ) \ 81 ( ( ( priority ) & SCHEDULER_PRIORITY_APPEND_FLAG ) != 0 ) 98 node->
owner = the_thread;
100 node->Priority.value = priority;
102 #if defined(RTEMS_SMP) 104 node->
Wait.Priority.scheduler = scheduler;
105 node->user = the_thread;
107 _SMP_sequence_lock_Initialize( &node->Priority.Lock );
155 #if defined(RTEMS_SMP) 159 seq = _SMP_sequence_lock_Read_begin( &node->Priority.Lock );
162 priority = node->Priority.value;
164 #if defined(RTEMS_SMP) 165 }
while ( _SMP_sequence_lock_Read_retry( &node->Priority.Lock, seq ) );
184 #if defined(RTEMS_SMP) 187 seq = _SMP_sequence_lock_Write_begin( &node->Priority.Lock );
191 node->Priority.value = new_priority;
193 #if defined(RTEMS_SMP) 194 _SMP_sequence_lock_Write_end( &node->Priority.Lock, seq );
198 #if defined(RTEMS_SMP) RTEMS_INLINE_ROUTINE Thread_Control * _Scheduler_Node_get_owner(const Scheduler_Node *node)
Gets the owner of the node.
Definition: schedulernodeimpl.h:135
RTEMS_INLINE_ROUTINE void _Scheduler_Node_set_priority(Scheduler_Node *node, Priority_Control new_priority, bool prepend_it)
Sets the priority of the node.
Definition: schedulernodeimpl.h:178
RTEMS_INLINE_ROUTINE void _Chain_Initialize_node(Chain_Node *the_node)
Initializes a chain node.
Definition: chainimpl.h:122
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:70
RTEMS_INLINE_ROUTINE const Scheduler_Control * _Scheduler_Node_get_scheduler(const Scheduler_Node *node)
Gets the scheduler of the node.
Definition: schedulernodeimpl.h:121
Priority Handler API Implementation.
RTEMS_INLINE_ROUTINE const Scheduler_Control * _Priority_Get_scheduler(const Priority_Aggregation *aggregation)
Gets the priority aggregation's scheduler.
Definition: priorityimpl.h:284
RTEMS_INLINE_ROUTINE void _Scheduler_Node_do_initialize(const struct _Scheduler_Control *scheduler, Scheduler_Node *node, Thread_Control *the_thread, Priority_Control priority)
Initializes a node.
Definition: schedulernodeimpl.h:91
RTEMS_INLINE_ROUTINE Priority_Control _Scheduler_Node_get_priority(Scheduler_Node *node)
Gets the priority of the node.
Definition: schedulernodeimpl.h:149
#define SCHEDULER_PRIORITY_APPEND_FLAG
Priority append indicator for the priority control used for the scheduler node priority.
Definition: schedulernodeimpl.h:51
struct _Thread_Control * owner
The thread owning this node.
Definition: schedulernode.h:123
Scheduler control.
Definition: scheduler.h:269
Scheduler node for per-thread data.
Definition: schedulernode.h:79
struct Scheduler_Node::@3980 Wait
Thread wait support block.
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
#define NULL
Requests a GPIO pin group configuration.
Definition: bestcomm_api.h:77