RTEMS  5.0.0
Macros | Functions
schedulerimpl.h File Reference

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.

Macros

#define SCHEDULER_PRIORITY_MAP(priority)   ( ( priority ) << 1 )
 Maps a priority value to support the append indicator.
 
#define SCHEDULER_PRIORITY_UNMAP(priority)   ( ( priority ) >> 1 )
 Returns the plain priority value.
 
#define SCHEDULER_PRIORITY_PURIFY(priority)   ( ( priority ) & ~( (Priority_Control) SCHEDULER_PRIORITY_APPEND_FLAG ) )
 Clears the priority append indicator bit.
 
#define SCHEDULER_PRIORITY_APPEND(priority)   ( ( priority ) | SCHEDULER_PRIORITY_APPEND_FLAG )
 Returns the priority control with the append indicator bit set.
 
#define SCHEDULER_PRIORITY_IS_APPEND(priority)   ( ( ( priority ) & SCHEDULER_PRIORITY_APPEND_FLAG ) != 0 )
 Returns true, if the item should be appended to its priority group, otherwise returns false and the item should be prepended to its priority group.
 

Functions

void _Scheduler_Handler_initialization (void)
 Initializes the scheduler to the policy chosen by the user. More...
 
RTEMS_INLINE_ROUTINE Scheduler_Context_Scheduler_Get_context (const Scheduler_Control *scheduler)
 
RTEMS_INLINE_ROUTINE const Scheduler_Control_Scheduler_Get_by_CPU (const Per_CPU_Control *cpu)
 
RTEMS_INLINE_ROUTINE void _Scheduler_Acquire_critical (const Scheduler_Control *scheduler, ISR_lock_Context *lock_context)
 Acquires the scheduler instance inside a critical section (interrupts disabled). More...
 
RTEMS_INLINE_ROUTINE void _Scheduler_Release_critical (const Scheduler_Control *scheduler, ISR_lock_Context *lock_context)
 Releases the scheduler instance inside a critical section (interrupts disabled). More...
 
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule (Thread_Control *the_thread)
 General scheduling decision. More...
 
RTEMS_INLINE_ROUTINE void _Scheduler_Yield (Thread_Control *the_thread)
 Scheduler yield with a particular thread. More...
 
RTEMS_INLINE_ROUTINE void _Scheduler_Block (Thread_Control *the_thread)
 Blocks a thread with respect to the scheduler. More...
 
RTEMS_INLINE_ROUTINE void _Scheduler_Unblock (Thread_Control *the_thread)
 Unblocks a thread with respect to the scheduler. More...
 
RTEMS_INLINE_ROUTINE void _Scheduler_Update_priority (Thread_Control *the_thread)
 Propagates a priority change of a thread to the scheduler. More...
 
RTEMS_INLINE_ROUTINE 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...
 
RTEMS_INLINE_ROUTINE 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...
 
RTEMS_INLINE_ROUTINE void _Scheduler_Node_initialize (const Scheduler_Control *scheduler, Scheduler_Node *node, Thread_Control *the_thread, Priority_Control priority)
 Initializes a scheduler node. More...
 
RTEMS_INLINE_ROUTINE void _Scheduler_Node_destroy (const Scheduler_Control *scheduler, Scheduler_Node *node)
 Destroys a scheduler node. More...
 
RTEMS_INLINE_ROUTINE 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...
 
RTEMS_INLINE_ROUTINE 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...
 
RTEMS_INLINE_ROUTINE void _Scheduler_Tick (const Per_CPU_Control *cpu)
 Scheduler method invoked at each clock tick. More...
 
RTEMS_INLINE_ROUTINE 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...
 
RTEMS_INLINE_ROUTINE bool _Scheduler_Has_processor_ownership (const Scheduler_Control *scheduler, uint32_t cpu_index)
 
RTEMS_INLINE_ROUTINE const Processor_mask * _Scheduler_Get_processors (const Scheduler_Control *scheduler)
 
bool _Scheduler_Get_affinity (Thread_Control *the_thread, size_t cpusetsize, cpu_set_t *cpuset)
 
RTEMS_INLINE_ROUTINE bool _Scheduler_default_Set_affinity_body (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node, const Processor_mask *affinity)
 
bool _Scheduler_Set_affinity (Thread_Control *the_thread, size_t cpusetsize, const cpu_set_t *cpuset)
 
RTEMS_INLINE_ROUTINE 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))
 
RTEMS_INLINE_ROUTINE uint32_t _Scheduler_Get_processor_count (const Scheduler_Control *scheduler)
 
RTEMS_INLINE_ROUTINE Objects_Id _Scheduler_Build_id (uint32_t scheduler_index)
 
RTEMS_INLINE_ROUTINE uint32_t _Scheduler_Get_index_by_id (Objects_Id id)
 
RTEMS_INLINE_ROUTINE const Scheduler_Control_Scheduler_Get_by_id (Objects_Id id)
 
RTEMS_INLINE_ROUTINE uint32_t _Scheduler_Get_index (const Scheduler_Control *scheduler)
 
RTEMS_INLINE_ROUTINE void _Scheduler_Update_heir (Thread_Control *new_heir, bool force_dispatch)
 
RTEMS_INLINE_ROUTINE Status_Control _Scheduler_Set (const Scheduler_Control *new_scheduler, Thread_Control *the_thread, Priority_Control priority)
 

Detailed Description

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.