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) 105 node->
user = the_thread;
155 #if defined(RTEMS_SMP) 162 priority = node->Priority.value;
164 #if defined(RTEMS_SMP) 184 #if defined(RTEMS_SMP) 191 node->Priority.value = new_priority;
193 #if defined(RTEMS_SMP) 198 #if defined(RTEMS_SMP) static void _SMP_sequence_lock_Initialize(SMP_sequence_lock_Control *lock)
Initializes an SMP sequence lock.
static unsigned int _SMP_sequence_lock_Write_begin(SMP_sequence_lock_Control *lock)
Begins an SMP sequence lock write operation.
uint64_t Priority_Control
The thread priority control.
static __inline__ const Scheduler_Control * _Priority_Get_scheduler(const Priority_Aggregation *aggregation)
Gets the priority aggregation's scheduler.
const struct _Scheduler_Control * scheduler
The scheduler instance of this priority aggregation.
static __inline__ void _Chain_Initialize_node(Chain_Node *the_node)
Initializes a chain node.
static __inline__ Priority_Control _Scheduler_Node_get_priority(Scheduler_Node *node)
Gets the priority of the node.
struct Scheduler_Node::@19 Thread
Block to register and manage this scheduler node in the thread control block of the owner of this sch...
static unsigned int _SMP_sequence_lock_Read_begin(const SMP_sequence_lock_Control *lock)
Begins an SMP sequence lock read operation.
struct _Thread_Control * idle
The idle thread claimed by this node in case the sticky level is greater than zero and the thread is ...
Chain_Node Wait_node
Node to add this scheduler node to Thread_Control::Scheduler::Wait_nodes.
struct _Thread_Control * user
The thread using this node.
static void _SMP_sequence_lock_Write_end(SMP_sequence_lock_Control *lock, unsigned int seq)
Ends an SMP sequence lock write operation.
static __inline__ Thread_Control * _Scheduler_Node_get_owner(const Scheduler_Node *node)
Gets the owner of the node.
static __inline__ void _Scheduler_Node_do_initialize(const struct _Scheduler_Control *scheduler, Scheduler_Node *node, Thread_Control *the_thread, Priority_Control priority)
Initializes a node.
static bool _SMP_sequence_lock_Read_retry(SMP_sequence_lock_Control *lock, unsigned int seq)
Ends an SMP sequence lock read operation and indicates if a retry is necessary.
#define SCHEDULER_PRIORITY_APPEND_FLAG
Priority append indicator for the priority control used for the scheduler node priority.
static __inline__ Thread_Control * _Scheduler_Node_get_idle(const Scheduler_Node *node)
Gets the idle thread of the node.
struct _Thread_Control * owner
The thread owning this node.
struct Scheduler_Node::@20 Wait
Thread wait support block.
static __inline__ void _Scheduler_Node_set_priority(Scheduler_Node *node, Priority_Control new_priority, bool prepend_it)
Sets the priority of the node.
Priority Handler API Implementation.
static __inline__ const Scheduler_Control * _Scheduler_Node_get_scheduler(const Scheduler_Node *node)
Gets the scheduler of the node.
Scheduler node for per-thread data.
#define RTEMS_INLINE_ROUTINE
Gives a hint to the compiler in a function declaration to inline this function.
static __inline__ Thread_Control * _Scheduler_Node_get_user(const Scheduler_Node *node)
Gets the user of the node.
static __inline__ void _Scheduler_Node_set_user(Scheduler_Node *node, Thread_Control *user)
Sets the user of the node.