RTEMS CPU Kit with SuperCore  4.11.2
Data Fields
Per_CPU_Control Struct Reference

Per CPU Core Structure. More...

#include <percpu.h>

Collaboration diagram for Per_CPU_Control:
Collaboration graph
[legend]

Data Fields

void * interrupt_stack_low
 This contains a pointer to the lower range of the interrupt stack for this CPU. More...
 
void * interrupt_stack_high
 This contains a pointer to the interrupt stack pointer for this CPU. More...
 
uint32_t isr_nest_level
 This contains the current interrupt nesting level on this CPU.
 
volatile uint32_t thread_dispatch_disable_level
 The thread dispatch critical section nesting counter which is used to prevent context switches at inopportune moments.
 
struct Thread_Controlexecuting
 This is the thread executing on this processor. More...
 
struct Thread_Controlheir
 This is the heir thread for this processor. More...
 
volatile bool dispatch_necessary
 This is set to true when this processor needs to run the dispatcher. More...
 
Timestamp_Control time_of_last_context_switch
 This is the time of the last context switch on this CPU. More...
 
Per_CPU_Stats Stats
 

Detailed Description

Per CPU Core Structure.

This structure is used to hold per core state information.

Field Documentation

◆ dispatch_necessary

volatile bool Per_CPU_Control::dispatch_necessary

This is set to true when this processor needs to run the dispatcher.

It is volatile since interrupts may alter this flag.

This field is not protected by a lock. There are two writers after multitasking start. The scheduler owning this processor sets this indicator to true, after it updated the heir field. This processor sets this indicator to false, before it reads the heir. This field is used in combination with the heir field.

See also
_Thread_Get_heir_and_make_it_executing().

Referenced by _Thread_Get_heir_and_make_it_executing().

◆ executing

struct Thread_Control* Per_CPU_Control::executing

This is the thread executing on this processor.

This field is not protected by a lock. The only writer is this processor.

On SMP configurations a thread may be registered as executing on more than one processor in case a thread migration is in progress. On SMP configurations use _Thread_Is_executing_on_a_processor() to figure out if a thread context is executing on a processor.

Referenced by _Thread_Do_dispatch().

◆ heir

struct Thread_Control* Per_CPU_Control::heir

This is the heir thread for this processor.

This field is not protected by a lock. The only writer after multitasking start is the scheduler owning this processor. This processor will set the dispatch necessary indicator to false, before it reads the heir. This field is used in combination with the dispatch necessary indicator.

A thread can be a heir on at most one processor in the system.

See also
_Thread_Get_heir_and_make_it_executing().

◆ interrupt_stack_high

void* Per_CPU_Control::interrupt_stack_high

This contains a pointer to the interrupt stack pointer for this CPU.

It will be loaded at the beginning on an ISR.

◆ interrupt_stack_low

void* Per_CPU_Control::interrupt_stack_low

This contains a pointer to the lower range of the interrupt stack for this CPU.

This is the address allocated and freed.

◆ time_of_last_context_switch

Timestamp_Control Per_CPU_Control::time_of_last_context_switch

This is the time of the last context switch on this CPU.


The documentation for this struct was generated from the following file: