RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Modules | Data Structures | Macros | Functions

Example CPU Architecture Support. More...

Modules

 CPUEndian
 CPUEndian.
 
 Example Assembler Support
 
 Management
 Management.
 
 Processor Dependent Bitfield Manipulation
 
 Processor Dependent Context Management
 Destroys the context of the thread.
 
 Processor Dependent Interrupt Management
 

Data Structures

struct  CPU_Per_CPU_control
 The CPU specific per-CPU control. More...
 

Macros

#define CPU_PER_CPU_CONTROL_SIZE   0
 The size of the CPU specific per-CPU control.
 
#define CPU_THREAD_LOCAL_STORAGE_VARIANT   10
 Defines the thread-local storage (TLS) variant.
 
#define _CPU_Get_current_per_CPU_control()   ( _CPU_Per_CPU_current )
 Optional method to obtain the per-CPU control of the current processor.
 
#define _CPU_Get_thread_executing()   ( _CPU_Per_CPU_current->executing )
 Optional method to get the executing thread.
 

Functions

register struct Per_CPU_Control *_CPU_Per_CPU_current asm ("rX")
 Special register pointing to the per-CPU control of the current processor.
 
void _CPU_Context_volatile_clobber (uintptr_t pattern)
 
void _CPU_Context_validate (uintptr_t pattern)
 

Detailed Description

Example CPU Architecture Support.

Macro Definition Documentation

◆ _CPU_Get_current_per_CPU_control

#define _CPU_Get_current_per_CPU_control ( )    ( _CPU_Per_CPU_current )

Optional method to obtain the per-CPU control of the current processor.

This is optional. Not every CPU port needs this. It is only an optional optimization variant. In case this macro is undefined, the default implementation using the current processor index will be used.

◆ _CPU_Get_thread_executing

#define _CPU_Get_thread_executing ( )    ( _CPU_Per_CPU_current->executing )

Optional method to get the executing thread.

This is optional. Not every CPU port needs this. It is only an optional optimization variant. In case this macro is undefined, the default implementation uses the per-CPU information and the current processor index to get the executing thread.

◆ CPU_PER_CPU_CONTROL_SIZE

#define CPU_PER_CPU_CONTROL_SIZE   0

The size of the CPU specific per-CPU control.

This define must be visible to assember files since it is used to derive structure offsets.

◆ CPU_THREAD_LOCAL_STORAGE_VARIANT

#define CPU_THREAD_LOCAL_STORAGE_VARIANT   10

Defines the thread-local storage (TLS) variant.

Use one of the following values:

10: The architecture uses Variant I and the TLS offsets emitted by the linker neglect the TCB (examples: nios2, m68k, microblaze, powerpc, riscv). The thread pointer directly references the thread-local data area.

11: The architecture uses Variant I and the TLS offsets emitted by the linker take the TCB into account (examples: arm, aarch64). The thread pointer references the TCB.

20: The architecture uses Variant II (examples: i386, sparc).

Function Documentation

◆ asm()

register struct Per_CPU_Control *_CPU_Per_CPU_current asm ( "rX"  )

Special register pointing to the per-CPU control of the current processor.

This is optional. Not every CPU port needs this. It is only an optional optimization variant.