RTEMS CPU Kit with SuperCore  4.11.3
Macros
Configuration Helpers

This module contains items which are used internally to ease the configuration calculations. More...

Collaboration diagram for Configuration Helpers:

Macros

#define _Configure_Zero_or_One(_number)   ((_number) ? 1 : 0)
 Zero of one returns 0 if the parameter is 0 else 1 is returned.
 
#define _Configure_Align_up(_val, _align)   (((_val) + (_align) - 1) & ~((_align) - 1))
 General helper to aligned a value up to a power of two boundary.
 
#define _Configure_From_workspace(_size)
 This is a helper macro used in calculations in this file. More...
 
#define _Configure_From_stackspace(_stack_size)   _Configure_From_workspace(_stack_size)
 This is a helper macro used in stack space calculations in this file. More...
 
#define _Configure_Max_Objects(_max)   (_Configure_Zero_or_One(_max) * rtems_resource_maximum_per_allocation(_max))
 Do not use the unlimited bit as part of the multiplication for memory usage.
 
#define _Configure_Object_RAM(_number, _size)
 This macro accounts for how memory for a set of configured objects is allocated from the Executive Workspace. More...
 

Detailed Description

This module contains items which are used internally to ease the configuration calculations.

Macro Definition Documentation

◆ _Configure_From_stackspace

#define _Configure_From_stackspace (   _stack_size)    _Configure_From_workspace(_stack_size)

This is a helper macro used in stack space calculations in this file.

It may be provided by the application in case a special task stack allocator is used. The default is allocation from the RTEMS Workspace.

◆ _Configure_From_workspace

#define _Configure_From_workspace (   _size)
Value:
(ssize_t) (_Configure_Zero_or_One(_size) * \
_Configure_Align_up((_size) + HEAP_BLOCK_HEADER_SIZE, CPU_HEAP_ALIGNMENT))
#define _Configure_Zero_or_One(_number)
Zero of one returns 0 if the parameter is 0 else 1 is returned.
Definition: confdefs.h:1358
#define HEAP_BLOCK_HEADER_SIZE
The block header consists of the two size fields (Heap_Block::prev_size and Heap_Block::size_and_flag...
Definition: heap.h:185

This is a helper macro used in calculations in this file.

It is used to noted when an element is allocated from the RTEMS Workspace and adds a factor to account for heap overhead plus an alignment factor that may be applied.

◆ _Configure_Object_RAM

#define _Configure_Object_RAM (   _number,
  _size 
)
Value:
( \
_Configure_From_workspace(_Configure_Max_Objects(_number) * (_size)) + \
_Configure_From_workspace( \
_Configure_Zero_or_One(_number) * ( \
(_Configure_Max_Objects(_number) + 1) * sizeof(Objects_Control *) + \
_Configure_Align_up(sizeof(void *), CPU_ALIGNMENT) + \
_Configure_Align_up(sizeof(uint32_t), CPU_ALIGNMENT) \
) \
) \
)
The following defines the Object Control Block used to manage each object local to this node...
Definition: object.h:232
#define _Configure_Align_up(_val, _align)
General helper to aligned a value up to a power of two boundary.
Definition: confdefs.h:1363
#define _Configure_Zero_or_One(_number)
Zero of one returns 0 if the parameter is 0 else 1 is returned.
Definition: confdefs.h:1358
#define _Configure_Max_Objects(_max)
Do not use the unlimited bit as part of the multiplication for memory usage.
Definition: confdefs.h:1393

This macro accounts for how memory for a set of configured objects is allocated from the Executive Workspace.

NOTE: It does NOT attempt to address the more complex case of unlimited objects.