38#ifndef _RTEMS_SCORE_SCHEDULERNODEIMPL_H
39#define _RTEMS_SCORE_SCHEDULERNODEIMPL_H
56#define SCHEDULER_NODE_OF_WAIT_PRIORITY_NODE( node ) \
57 RTEMS_CONTAINER_OF( node, Scheduler_Node, Wait.Priority.Node.Node.Chain )
59#define SCHEDULER_NODE_OF_WAIT_PRIORITY( node ) \
60 RTEMS_CONTAINER_OF( node, Scheduler_Node, Wait.Priority )
65#define SCHEDULER_PRIORITY_MAP( priority ) ( ( priority ) << 1 )
70#define SCHEDULER_PRIORITY_UNMAP( priority ) ( ( priority ) >> 1 )
75#define SCHEDULER_PRIORITY_PURIFY( priority ) \
76 ( ( priority ) & ~( (Priority_Control) PRIORITY_GROUP_LAST ) )
81#define SCHEDULER_PRIORITY_APPEND( priority ) \
82 ( ( priority ) | ( (Priority_Control) PRIORITY_GROUP_LAST ) )
89#define SCHEDULER_PRIORITY_IS_APPEND( priority ) \
90 ( ( ( priority ) & ( (Priority_Control) PRIORITY_GROUP_LAST ) ) != 0 )
103static inline void _Scheduler_Node_do_initialize(
110 node->owner = the_thread;
112 node->Priority.value = priority;
114#if defined(RTEMS_SMP)
115 _Chain_Initialize_node( &node->Thread.Wait_node );
116 node->Wait.Priority.scheduler = scheduler;
117 node->user = the_thread;
119#if CPU_SIZEOF_POINTER != 8
135static inline void _Scheduler_Node_do_destroy(
142#if defined(RTEMS_SMP) && CPU_SIZEOF_POINTER != 8
160 return _Priority_Get_scheduler( &node->Wait.Priority );
190#if defined(RTEMS_SMP) && CPU_SIZEOF_POINTER == 8
191 priority = _Atomic_Fetch_add_ulong(
192 &node->Priority.value,
200 priority = node->Priority.value;
217static inline void _Scheduler_Node_set_priority(
223#if defined(RTEMS_SMP) && CPU_SIZEOF_POINTER == 8
225 &node->Priority.value,
238#if defined(RTEMS_SMP)
259static inline void _Scheduler_Node_set_user(
288static inline void _Scheduler_Node_set_idle_user(
293 _Assert( _Scheduler_Node_get_idle( node ) ==
NULL );
295 _Scheduler_Node_get_owner( node ) == _Scheduler_Node_get_user( node )
298 _Scheduler_Node_set_user( node, idle );
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG and static analysis runs.
Definition: assert.h:96
#define _ISR_lock_Release(_lock, _context)
Releases an ISR lock inside an ISR disabled section.
Definition: isrlock.h:332
#define _ISR_lock_Acquire(_lock, _context)
Acquires an ISR lock inside an ISR disabled section.
Definition: isrlock.h:309
#define _ISR_lock_Destroy(_lock)
Destroys an ISR lock.
Definition: isrlock.h:215
#define _ISR_lock_Initialize(_lock, _name)
Initializes an ISR lock.
Definition: isrlock.h:201
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:91
Priority_Group_order
The priority group order determines if a priority node is inserted as the first or last node into its...
Definition: priorityimpl.h:62
#define NULL
Requests a GPIO pin group configuration.
Definition: xil_types.h:54
This header file provides interfaces of the Scheduler Handler related to scheduler nodes which are us...
This header file provides interfaces of the Priority Handler which are only used by the implementatio...
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:81
Scheduler node for per-thread data.
Definition: schedulernode.h:94
Scheduler control.
Definition: scheduler.h:335