RTEMS
|
Flexible Per-CPU Data. More...
Files | |
file | percpudata.h |
Definition of custom per-CPU items. | |
Macros | |
#define | PER_CPU_DATA_ITEM_DECLARE(type, item) RTEMS_LINKER_RWSET_ITEM_DECLARE( _Per_CPU_Data, type, item ) |
Declares a per-CPU item of the specified type. More... | |
#define | PER_CPU_DATA_ITEM(type, item) RTEMS_LINKER_RWSET_ITEM( _Per_CPU_Data, type, item ) |
Defines a per-CPU item of the specified type. More... | |
#define | PER_CPU_DATA_OFFSET(item) |
Returns the offset of the per-CPU item to the begin of the per-CPU data area. More... | |
#define | PER_CPU_DATA_GET_BY_OFFSET(cpu, type, offset) (type *) ( cpu->data + offset ) |
Returns a pointer of the specified type to the per-CPU item at the specified offset for the specified processor. More... | |
#define | PER_CPU_DATA_GET(cpu, type, item) PER_CPU_DATA_GET_BY_OFFSET( cpu, type, PER_CPU_DATA_OFFSET( item ) ) |
Returns a pointer of the specified type to the specified per-CPU item for the specified processor. More... | |
Functions | |
RTEMS_LINKER_RWSET_DECLARE (_Per_CPU_Data, char) | |
Flexible Per-CPU Data.
Provides the definition of custom per-CPU items. The items are collected in a special linker set. During system initialization the content of the linker set is duplicated for all secondary processors using memory allocated from the workspace. The begin and end of the per-CPU data area is cache line aligned (CPU_CACHE_LINE_BYTES).
#define PER_CPU_DATA_GET | ( | cpu, | |
type, | |||
item | |||
) | PER_CPU_DATA_GET_BY_OFFSET( cpu, type, PER_CPU_DATA_OFFSET( item ) ) |
Returns a pointer of the specified type to the specified per-CPU item for the specified processor.
cpu | The processor of the item. |
type | The type of the item. |
item | The designator of the item. |
Definition at line 107 of file percpudata.h.
#define PER_CPU_DATA_GET_BY_OFFSET | ( | cpu, | |
type, | |||
offset | |||
) | (type *) ( cpu->data + offset ) |
Returns a pointer of the specified type to the per-CPU item at the specified offset for the specified processor.
cpu | The processor of the item. |
type | The type of the item. |
offset | The offset of the item. |
Definition at line 90 of file percpudata.h.
#define PER_CPU_DATA_ITEM | ( | type, | |
item | |||
) | RTEMS_LINKER_RWSET_ITEM( _Per_CPU_Data, type, item ) |
Defines a per-CPU item of the specified type.
type | The type of the item. |
item | The designator of the item. |
Definition at line 68 of file percpudata.h.
#define PER_CPU_DATA_ITEM_DECLARE | ( | type, | |
item | |||
) | RTEMS_LINKER_RWSET_ITEM_DECLARE( _Per_CPU_Data, type, item ) |
Declares a per-CPU item of the specified type.
Items declared with this macro have external linkage.
type | The type of the item. |
item | The designator of the item. |
Definition at line 59 of file percpudata.h.
#define PER_CPU_DATA_OFFSET | ( | item | ) |
Returns the offset of the per-CPU item to the begin of the per-CPU data area.
item | The designator of the item. |
Definition at line 77 of file percpudata.h.