37#ifndef _RTEMS_SCORE_PERCPUDATA_H
38#define _RTEMS_SCORE_PERCPUDATA_H
64RTEMS_LINKER_RWSET_DECLARE( _Per_CPU_Data,
char );
71#define PER_CPU_DATA_NEED_INITIALIZATION() \
72 static const char * const _Per_CPU_Data_reference \
73 RTEMS_SECTION( ".rtemsroset.reference" ) RTEMS_USED = \
74 RTEMS_LINKER_SET_BEGIN( _Per_CPU_Data )
76#define PER_CPU_DATA_NEED_INITIALIZATION() \
77 RTEMS_LINKER_RWSET_DECLARE( _Per_CPU_Data, char )
88#define PER_CPU_DATA_ITEM_DECLARE( type, item ) \
89 RTEMS_LINKER_RWSET_ITEM_DECLARE( _Per_CPU_Data, type, item )
97#define PER_CPU_DATA_ITEM( type, item ) \
98 RTEMS_LINKER_RWSET_ITEM( _Per_CPU_Data, type, item )
106#define PER_CPU_DATA_OFFSET( item ) \
107 ( (uintptr_t) &_Linker_set__Per_CPU_Data_##item \
108 - (uintptr_t) RTEMS_LINKER_SET_BEGIN( _Per_CPU_Data ) )
119#define PER_CPU_DATA_GET_BY_OFFSET( cpu, type, offset ) \
120 (type *) ( cpu->data + offset )
122#define PER_CPU_DATA_GET_BY_OFFSET( cpu, type, offset ) \
123 (type *) ( (uintptr_t) RTEMS_LINKER_SET_BEGIN( _Per_CPU_Data ) + offset ), \
136#define PER_CPU_DATA_GET( cpu, type, item ) \
137 PER_CPU_DATA_GET_BY_OFFSET( cpu, type, PER_CPU_DATA_OFFSET( item ) )
139#define PER_CPU_DATA_GET( cpu, type, item ) \
140 &_Linker_set__Per_CPU_Data_##item, (void) cpu
This header file provides the linker sets API.
This header file provides the interfaces of the Per-CPU Information.