22 #include <rtems/config.h> 29 uint32_t scheduler_index;
30 #if defined(RTEMS_SMP) 45 #if defined(RTEMS_SMP) 46 cpu = _Per_CPU_Get_by_index( cpu_index );
52 if ( !_Per_CPU_Is_processor_online( cpu ) ) {
58 if ( cpu->Scheduler.
control == NULL ) {
82 &scheduler_node->
Wait.Priority,
99 cpu->Scheduler.
control = scheduler;
100 cpu->Scheduler.
context = scheduler_context;
static __inline__ void _Objects_Allocator_unlock(void)
Unlocks the object allocator mutex.
const struct _Scheduler_Control * home_scheduler
The home scheduler of this thread.
static __inline__ void _Priority_Initialize_one(Priority_Aggregation *aggregation, Priority_Node *node)
Initializes the priority aggregation with the given information.
uint64_t Priority_Control
The thread priority control.
static __inline__ void _Scheduler_Acquire_critical(const Scheduler_Control *scheduler, ISR_lock_Context *lock_context)
Acquires the scheduler instance inside a critical section (interrupts disabled).
static __inline__ Scheduler_Node * _Thread_Scheduler_get_node_by_index(const Thread_Control *the_thread, size_t scheduler_index)
Gets the thread's scheduler node by index.
void _Thread_Dispatch_direct(Per_CPU_Control *cpu_self)
Directly do a thread dispatch.
struct _Thread_Control * idle_if_online_and_unused
The idle thread for this processor in case it is online and currently not used by a scheduler instanc...
static __inline__ Priority_Control _Scheduler_Map_priority(const Scheduler_Control *scheduler, Priority_Control priority)
Maps a thread priority from the user domain to the scheduler domain.
Thread_Start_information Start
This status code indicates that the object still had resources in use.
Inlined Routines Associated with the Manipulation of the Scheduler.
This header file defines parts of the application configuration information API.
#define _ISR_lock_ISR_enable(_context)
Restores the saved interrupt state of the ISR lock context.
Thread_Scheduler_control Scheduler
Scheduler related control.
const struct Scheduler_Context * context
The scheduler context of the scheduler owning this processor.
void(* add_processor)(const Scheduler_Control *scheduler, Thread_Control *idle)
Add processor operation.
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 __inline__ void _Objects_Allocator_lock(void)
Locks the object allocator mutex.
Information for the Assert Handler.
Chain_Node Wait_node
Node to add this scheduler node to Thread_Control::Scheduler::Wait_nodes.
This status code indicates successful completion.
rtems_status_code rtems_scheduler_add_processor(rtems_id scheduler_id, uint32_t cpu_index)
Adds the processor to the set of processors owned by the scheduler instance.
static __inline__ void _Scheduler_Release_critical(const Scheduler_Control *scheduler, ISR_lock_Context *lock_context)
Releases the scheduler instance inside a critical section (interrupts disabled).
const Scheduler_Assignment _Scheduler_Initial_assignments[]
The scheduler assignments.
static __inline__ Per_CPU_Control * _Thread_Dispatch_disable_critical(const ISR_lock_Context *lock_context)
Disables thread dispatching inside a critical section (interrupts disabled).
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Priority_Control maximum_priority
The maximum priority value of this scheduler.
This status code indicates that an object was in wrong state for the requested operation.
Processor_mask Processors
Lock to protect this scheduler instance.
This header file defines the main parts of the Tasks Manager API.
const struct _Scheduler_Control * control
The scheduler control of the scheduler owning this processor.
const Scheduler_Control _Scheduler_Table[]
This table contains the configured schedulers.
static __inline__ void _Priority_Node_set_priority(Priority_Node *node, Priority_Control priority)
Sets the priority of the priority node to the given priority.
Chain_Control Scheduler_nodes
Scheduler nodes immediately available to the schedulers for this thread.
static __inline__ void _Chain_Initialize_one(Chain_Control *the_chain, Chain_Node *the_node)
Initializes this chain to contain exactly the specified node.
struct Scheduler_Node::@20 Wait
Thread wait support block.
This status code indicates that an object identifier was invalid.
Objects_Id rtems_id
Values of this type identify an RTEMS object.
This status code indicates that the directive was not configured.
Scheduler_Operations Operations
The scheduler operations.
const size_t _Scheduler_Count
This constant contains the count of configured schedulers.
Scheduler node for per-thread data.
static __inline__ Scheduler_Context * _Scheduler_Get_context(const Scheduler_Control *scheduler)
Gets the context of the scheduler.
#define _ISR_lock_ISR_disable(_context)
Disables interrupts and saves the previous interrupt state in the ISR lock context.
static __inline__ uint32_t _Scheduler_Get_index_by_id(Objects_Id id)
Gets the scheduler index from the given object build id.
Chain_Control Wait_nodes
Scheduler nodes immediately available to the thread by its home scheduler and due to thread queue own...
Local ISR lock context for acquire and release pairs.
#define rtems_configuration_get_maximum_processors()
Returns the maximum number of processors which are configured for this application.
static __inline__ bool _Chain_Is_empty(const Chain_Control *the_chain)
Checks if the chain is empty.
Priority_Node Real_priority
The base priority of this thread in its home scheduler instance.
union Scheduler_Node::@19::@22 Scheduler_node
Node to add this scheduler node to Thread_Control::Scheduler::Scheduler_nodes or a temporary remove l...
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG.
RTEMS_INLINE_ROUTINE void _Processor_mask_Set(Processor_mask *mask, uint32_t index)
Sets the specified index bit of the mask.