|
file | percpu.c |
| Allocate and Initialize Per CPU Structures.
|
|
|
#define | _Per_CPU_Acquire(cpu) |
|
#define | _Per_CPU_Release(cpu) |
|
#define | _Per_CPU_ISR_disable_and_acquire(cpu, isr_cookie) |
|
#define | _Per_CPU_Release_and_ISR_enable(cpu, isr_cookie) |
|
#define | _Per_CPU_Acquire_all(isr_cookie) _ISR_Local_disable( isr_cookie ) |
|
#define | _Per_CPU_Release_all(isr_cookie) _ISR_Local_enable( isr_cookie ) |
|
#define | _Per_CPU_Get_snapshot() ( &_Per_CPU_Information[ _SMP_Get_current_processor() ].per_cpu ) |
|
#define | _Per_CPU_Get() _Per_CPU_Get_snapshot() |
|
#define | _Thread_Dispatch_disable_level _Per_CPU_Get()->thread_dispatch_disable_level |
|
#define | _Thread_Heir _Per_CPU_Get()->heir |
|
#define | _Thread_Executing _Per_CPU_Get_executing( _Per_CPU_Get() ) |
|
#define | _ISR_Nest_level _Per_CPU_Get()->isr_nest_level |
|
#define | _CPU_Interrupt_stack_low _Per_CPU_Get()->interrupt_stack_low |
|
#define | _CPU_Interrupt_stack_high _Per_CPU_Get()->interrupt_stack_high |
|
#define | _Thread_Dispatch_necessary _Per_CPU_Get()->dispatch_necessary |
|
This defines the per CPU state information required by RTEMS and the BSP. In an SMP configuration, there will be multiple instances of this data structure – one per CPU – and the current CPU number will be used as the index.
◆ _Per_CPU_Acquire
#define _Per_CPU_Acquire |
( |
|
cpu | ) |
|
Value:do { \
(void) ( cpu ); \
} while ( 0 )
◆ _Per_CPU_ISR_disable_and_acquire
#define _Per_CPU_ISR_disable_and_acquire |
( |
|
cpu, |
|
|
|
isr_cookie |
|
) |
| |
Value:do { \
_ISR_Local_disable( isr_cookie ); \
(void) ( cpu ); \
} while ( 0 )
◆ _Per_CPU_Release
#define _Per_CPU_Release |
( |
|
cpu | ) |
|
Value:do { \
(void) ( cpu ); \
} while ( 0 )
◆ _Per_CPU_Release_and_ISR_enable
#define _Per_CPU_Release_and_ISR_enable |
( |
|
cpu, |
|
|
|
isr_cookie |
|
) |
| |
Value:do { \
(void) ( cpu ); \
_ISR_Local_enable( isr_cookie ); \
} while ( 0 )
◆ Per_CPU_Control
Per CPU Core Structure.
This structure is used to hold per core state information.
◆ Per_CPU_Watchdog_index
Per-CPU watchdog header index.
Enumerator |
---|
PER_CPU_WATCHDOG_TICKS | Index for tick clock per-CPU watchdog header.
The reference time point for the tick clock is the system start. The clock resolution is one system clock tick. It is used for the system clock tick based time services.
|
PER_CPU_WATCHDOG_REALTIME | Index for realtime clock per-CPU watchdog header.
The reference time point for the realtime clock is the POSIX Epoch. The clock resolution is one nanosecond. It is used for the time of day services and the POSIX services using CLOCK_REALTIME.
|
PER_CPU_WATCHDOG_MONOTONIC | Index for monotonic clock per-CPU watchdog header.
The reference time point for the monotonic clock is the system start. The clock resolution is one nanosecond. It is used for the POSIX services using CLOCK_MONOTONIC.
|
PER_CPU_WATCHDOG_COUNT | Count of per-CPU watchdog headers.
|
◆ _Thread_Get_executing()
Returns the thread control block of the executing thread.
This function can be called in any thread context. On SMP configurations, interrupts are disabled to ensure that the processor index is used consistently if no CPU port specific method is available to get the executing thread.
- Returns
- The thread control block of the executing thread.
◆ CPU_STRUCTURE_ALIGNMENT
Set of Per CPU Core Information.
This is an array of per CPU core information.