RTEMS
|
Inlined Routines Associated with the Manipulation of the Scheduler. More...
#include <rtems/score/scheduler.h>
#include <rtems/score/assert.h>
#include <rtems/score/priorityimpl.h>
#include <rtems/score/smpimpl.h>
#include <rtems/score/status.h>
#include <rtems/score/threadimpl.h>
Go to the source code of this file.
Typedefs | |
typedef Thread_Control *(* | Scheduler_Get_idle_thread) (Scheduler_Context *context) |
Gets an idle thread from the scheduler instance. More... | |
typedef void(* | Scheduler_Release_idle_thread) (Scheduler_Context *context, Thread_Control *idle) |
Releases an idle thread to the scheduler instance for reuse. More... | |
Enumerations | |
enum | Scheduler_Try_to_schedule_action { SCHEDULER_TRY_TO_SCHEDULE_DO_SCHEDULE, SCHEDULER_TRY_TO_SCHEDULE_DO_IDLE_EXCHANGE, SCHEDULER_TRY_TO_SCHEDULE_DO_BLOCK } |
This enumeration defines what a scheduler should do with a node which could be scheduled. | |
Functions | |
void | _Scheduler_Handler_initialization (void) |
Initializes the scheduler to the policy chosen by the user. More... | |
static __inline__ Scheduler_Context * | _Scheduler_Get_context (const Scheduler_Control *scheduler) |
Gets the context of the scheduler. More... | |
static __inline__ const Scheduler_Control * | _Scheduler_Get_by_CPU (const Per_CPU_Control *cpu) |
Gets the scheduler for the cpu. More... | |
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). More... | |
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). More... | |
static __inline__ bool | _Scheduler_Is_non_preempt_mode_supported (const Scheduler_Control *scheduler) |
Indicate if the thread non-preempt mode is supported by the scheduler. More... | |
void | _Scheduler_Request_ask_for_help (Thread_Control *the_thread) |
static __inline__ void | _Scheduler_Ask_for_help (Thread_Control *the_thread) |
Registers an ask for help request if necessary. More... | |
static __inline__ void | _Scheduler_Schedule (Thread_Control *the_thread) |
General scheduling decision. More... | |
static __inline__ void | _Scheduler_Yield (Thread_Control *the_thread) |
Scheduler yield with a particular thread. More... | |
static __inline__ void | _Scheduler_Block (Thread_Control *the_thread) |
Blocks a thread with respect to the scheduler. More... | |
static __inline__ void | _Scheduler_Unblock (Thread_Control *the_thread) |
Unblocks a thread with respect to the scheduler. More... | |
static __inline__ void | _Scheduler_Update_priority (Thread_Control *the_thread) |
Propagates a priority change of a thread to the scheduler. More... | |
static __inline__ void | _Scheduler_Priority_and_sticky_update (Thread_Control *the_thread, int sticky_level_change) |
Changes the sticky level of the home scheduler node and propagates a priority change of a thread to the scheduler. More... | |
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. More... | |
static __inline__ Priority_Control | _Scheduler_Unmap_priority (const Scheduler_Control *scheduler, Priority_Control priority) |
Unmaps a thread priority from the scheduler domain to the user domain. More... | |
static __inline__ void | _Scheduler_Node_initialize (const Scheduler_Control *scheduler, Scheduler_Node *node, Thread_Control *the_thread, Priority_Control priority) |
Initializes a scheduler node. More... | |
static __inline__ void | _Scheduler_Node_destroy (const Scheduler_Control *scheduler, Scheduler_Node *node) |
Destroys a scheduler node. More... | |
static __inline__ void | _Scheduler_Release_job (Thread_Control *the_thread, Priority_Node *priority_node, uint64_t deadline, Thread_queue_Context *queue_context) |
Releases a job of a thread with respect to the scheduler. More... | |
static __inline__ void | _Scheduler_Cancel_job (Thread_Control *the_thread, Priority_Node *priority_node, Thread_queue_Context *queue_context) |
Cancels a job of a thread with respect to the scheduler. More... | |
static __inline__ void | _Scheduler_Tick (const Per_CPU_Control *cpu) |
Scheduler method invoked at each clock tick. More... | |
static __inline__ void | _Scheduler_Start_idle (const Scheduler_Control *scheduler, Thread_Control *the_thread, Per_CPU_Control *cpu) |
Starts the idle thread for a particular processor. More... | |
static __inline__ bool | _Scheduler_Has_processor_ownership (const Scheduler_Control *scheduler, uint32_t cpu_index) |
Checks if the scheduler of the cpu with the given index is equal to the given scheduler. More... | |
static __inline__ const Processor_mask * | _Scheduler_Get_processors (const Scheduler_Control *scheduler) |
Gets the processors of the scheduler. More... | |
bool | _Scheduler_Get_affinity (Thread_Control *the_thread, size_t cpusetsize, cpu_set_t *cpuset) |
Copies the thread's scheduler's affinity to the given cpuset. More... | |
static __inline__ bool | _Scheduler_default_Set_affinity_body (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node, const Processor_mask *affinity) |
Checks if the affinity is a subset of the online processors. More... | |
bool | _Scheduler_Set_affinity (Thread_Control *the_thread, size_t cpusetsize, const cpu_set_t *cpuset) |
Sets the thread's scheduler's affinity. More... | |
static __inline__ void | _Scheduler_Generic_block (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node, void(*extract)(const Scheduler_Control *, Thread_Control *, Scheduler_Node *), void(*schedule)(const Scheduler_Control *, Thread_Control *, bool)) |
Blocks the thread. More... | |
static __inline__ uint32_t | _Scheduler_Get_processor_count (const Scheduler_Control *scheduler) |
Gets the number of processors of the scheduler. More... | |
static __inline__ Objects_Id | _Scheduler_Build_id (uint32_t scheduler_index) |
Builds an object build id. More... | |
static __inline__ uint32_t | _Scheduler_Get_index_by_id (Objects_Id id) |
Gets the scheduler index from the given object build id. More... | |
static __inline__ const Scheduler_Control * | _Scheduler_Get_by_id (Objects_Id id) |
Gets the scheduler from the given object build id. More... | |
static __inline__ uint32_t | _Scheduler_Get_index (const Scheduler_Control *scheduler) |
Gets the index of the scheduler. More... | |
static __inline__ void | _Scheduler_Thread_change_state (Thread_Control *the_thread, Thread_Scheduler_state new_state) |
Changes the threads state to the given new state. More... | |
static __inline__ void | _Scheduler_Set_idle_thread (Scheduler_Node *node, Thread_Control *idle) |
Sets the scheduler node's idle thread. More... | |
static __inline__ Thread_Control * | _Scheduler_Use_idle_thread (Scheduler_Context *context, Scheduler_Node *node, Per_CPU_Control *cpu, Scheduler_Get_idle_thread get_idle_thread) |
Uses an idle thread for this scheduler node. More... | |
static __inline__ Scheduler_Try_to_schedule_action | _Scheduler_Try_to_schedule_node (Scheduler_Context *context, Scheduler_Node *node, const Thread_Control *idle, Scheduler_Get_idle_thread get_idle_thread) |
Tries to schedule the scheduler node. More... | |
static __inline__ Thread_Control * | _Scheduler_Release_idle_thread (Scheduler_Context *context, Scheduler_Node *node, Scheduler_Release_idle_thread release_idle_thread) |
Releases an idle thread using this scheduler node. More... | |
static __inline__ void | _Scheduler_Exchange_idle_thread (Scheduler_Node *needs_idle, Scheduler_Node *uses_idle, Thread_Control *idle) |
Exchanges an idle thread from the scheduler node that uses it right now to another scheduler node. More... | |
static __inline__ Per_CPU_Control * | _Scheduler_Block_node (Scheduler_Context *context, Thread_Control *thread, Scheduler_Node *node, bool is_scheduled, Scheduler_Get_idle_thread get_idle_thread) |
Blocks this scheduler node. More... | |
static __inline__ void | _Scheduler_Discard_idle_thread (Scheduler_Context *context, Thread_Control *the_thread, Scheduler_Node *node, Scheduler_Release_idle_thread release_idle_thread) |
Discard the idle thread from the scheduler node. More... | |
static __inline__ bool | _Scheduler_Unblock_node (Scheduler_Context *context, Thread_Control *the_thread, Scheduler_Node *node, bool is_scheduled, Scheduler_Release_idle_thread release_idle_thread) |
Unblocks this scheduler node. More... | |
static __inline__ void | _Scheduler_Update_heir (Thread_Control *new_heir, bool force_dispatch) |
Updates the heir. More... | |
static __inline__ Status_Control | _Scheduler_Set (const Scheduler_Control *new_scheduler, Thread_Control *the_thread, Priority_Control priority) |
Sets a new scheduler. More... | |
Inlined Routines Associated with the Manipulation of the Scheduler.
This inline file contains all of the inlined routines associated with the manipulation of the scheduler.
Definition in file schedulerimpl.h.