RTEMS CPU Kit with SuperCore  4.11.3
Files | Data Structures | Macros | Functions
Deterministic Priority Affinity SMP Scheduler

This is an extension of the Deterministic Priority SMP Scheduler. More...

Collaboration diagram for Deterministic Priority Affinity SMP Scheduler:

Files

file  schedulerpriorityaffinitysmp.h
 Deterministic Priority Affinity SMP Scheduler API.
 
file  schedulerpriorityaffinitysmp.c
 Deterministic Priority Affinity SMP Scheduler Implementation.
 

Data Structures

struct  Scheduler_priority_affinity_SMP_Node
 Scheduler node specialization for Deterministic Priority Affinity SMP schedulers. More...
 

Macros

#define SCHEDULER_PRIORITY_AFFINITY_SMP_ENTRY_POINTS
 Entry points for the Deterministic Priority Affinity SMP Scheduler. More...
 

Functions

void _Scheduler_priority_affinity_SMP_Node_initialize (const Scheduler_Control *scheduler, Thread_Control *thread)
 Initializes per thread scheduler information. More...
 
void _Scheduler_priority_affinity_SMP_Block (const Scheduler_Control *scheduler, Thread_Control *thread)
 SMP Priority Affinity Scheduler Block Operation. More...
 
Thread_Control_Scheduler_priority_affinity_SMP_Unblock (const Scheduler_Control *scheduler, Thread_Control *thread)
 SMP Priority Affinity Scheduler Unblock Operation. More...
 
bool _Scheduler_priority_affinity_SMP_Get_affinity (const Scheduler_Control *scheduler, Thread_Control *thread, size_t cpusetsize, cpu_set_t *cpuset)
 Get affinity for the priority affinity SMP scheduler. More...
 
Thread_Control_Scheduler_priority_affinity_SMP_Change_priority (const Scheduler_Control *scheduler, Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it)
 Change priority for the priority affinity SMP scheduler. More...
 
Thread_Control_Scheduler_priority_affinity_SMP_Ask_for_help (const Scheduler_Control *scheduler, Thread_Control *offers_help, Thread_Control *needs_help)
 
bool _Scheduler_priority_affinity_SMP_Set_affinity (const Scheduler_Control *scheduler, Thread_Control *thread, size_t cpusetsize, const cpu_set_t *cpuset)
 Set affinity for the priority affinity SMP scheduler. More...
 

Detailed Description

This is an extension of the Deterministic Priority SMP Scheduler.

which is an implementation of the global fixed priority scheduler (G-FP). It adds thread to core affinity support.

Note
This is the first iteration of this scheduler. It currently tracks the requested affinity to exercise the Scheduler Framework but it does not honor that affinity in assigning threads to cores. This will be added in a subsequent revision.

Macro Definition Documentation

◆ SCHEDULER_PRIORITY_AFFINITY_SMP_ENTRY_POINTS

#define SCHEDULER_PRIORITY_AFFINITY_SMP_ENTRY_POINTS
Value:
{ \
_Scheduler_priority_SMP_Initialize, \
_Scheduler_default_Schedule, \
_Scheduler_priority_SMP_Yield, \
_Scheduler_priority_affinity_SMP_Block, \
_Scheduler_priority_affinity_SMP_Unblock, \
_Scheduler_priority_affinity_SMP_Change_priority, \
_Scheduler_priority_affinity_SMP_Ask_for_help, \
_Scheduler_priority_affinity_SMP_Node_initialize, \
_Scheduler_default_Node_destroy, \
_Scheduler_priority_SMP_Update_priority, \
_Scheduler_priority_Priority_compare, \
_Scheduler_default_Release_job, \
_Scheduler_default_Tick, \
_Scheduler_SMP_Start_idle, \
_Scheduler_priority_affinity_SMP_Get_affinity, \
_Scheduler_priority_affinity_SMP_Set_affinity \
}

Entry points for the Deterministic Priority Affinity SMP Scheduler.

Function Documentation

◆ _Scheduler_priority_affinity_SMP_Block()

void _Scheduler_priority_affinity_SMP_Block ( const Scheduler_Control scheduler,
Thread_Control thread 
)

SMP Priority Affinity Scheduler Block Operation.

This method is the block operation for this scheduler.

Parameters
[in]scheduleris the scheduler instance information
[in]threadis the thread to block

◆ _Scheduler_priority_affinity_SMP_Change_priority()

Thread_Control* _Scheduler_priority_affinity_SMP_Change_priority ( const Scheduler_Control scheduler,
Thread_Control the_thread,
Priority_Control  new_priority,
bool  prepend_it 
)

Change priority for the priority affinity SMP scheduler.

Parameters
[in]schedulerThe scheduler of the thread.
[in]the_threadThe associated thread.
[in]new_priorityThe new priority for the thread.
[in]prepend_itAppend or prepend the thread to its priority FIFO.

◆ _Scheduler_priority_affinity_SMP_Get_affinity()

bool _Scheduler_priority_affinity_SMP_Get_affinity ( const Scheduler_Control scheduler,
Thread_Control thread,
size_t  cpusetsize,
cpu_set_t *  cpuset 
)

Get affinity for the priority affinity SMP scheduler.

Parameters
[in]schedulerThe scheduler of the thread.
[in]threadThe associated thread.
[in]cpusetsizeThe size of the cpuset.
[in,out]cpusetThe associated affinity set.
Return values
0Successfully got cpuset
-1The cpusetsize is invalid for the system

◆ _Scheduler_priority_affinity_SMP_Node_initialize()

void _Scheduler_priority_affinity_SMP_Node_initialize ( const Scheduler_Control scheduler,
Thread_Control thread 
)

Initializes per thread scheduler information.

This routine allocates thread->scheduler.

Parameters
[in]schedulerpoints to the scheduler specific information.
[in]threadis the thread the scheduler is allocating management memory for.

◆ _Scheduler_priority_affinity_SMP_Set_affinity()

bool _Scheduler_priority_affinity_SMP_Set_affinity ( const Scheduler_Control scheduler,
Thread_Control thread,
size_t  cpusetsize,
const cpu_set_t *  cpuset 
)

Set affinity for the priority affinity SMP scheduler.

Parameters
[in]schedulerThe scheduler of the thread.
[in]threadThe associated thread.
[in]cpusetsizeThe size of the cpuset.
[in]cpusetAffinity new affinity set.
Return values
trueif successful
falseif unsuccessful

◆ _Scheduler_priority_affinity_SMP_Unblock()

Thread_Control* _Scheduler_priority_affinity_SMP_Unblock ( const Scheduler_Control scheduler,
Thread_Control thread 
)

SMP Priority Affinity Scheduler Unblock Operation.

This method is the unblock operation for this scheduler.

Parameters
[in]scheduleris the scheduler instance information
[in]threadis the thread to unblock