Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Iterable Sections APIs. More...
Macros | |
#define | ITERABLE_SECTION_ROM(struct_type, subalign) |
Define a read-only iterable section output. More... | |
#define | ITERABLE_SECTION_ROM_GC_ALLOWED(struct_type, subalign) |
Define a garbage collectable read-only iterable section output. More... | |
#define | ITERABLE_SECTION_RAM(struct_type, subalign) |
Define a read-write iterable section output. More... | |
#define | ITERABLE_SECTION_RAM_GC_ALLOWED(struct_type, subalign) |
Define a garbage collectable read-write iterable section output. More... | |
#define | STRUCT_SECTION_ITERABLE(struct_type, name) |
Defines a new iterable section. More... | |
#define | STRUCT_SECTION_ITERABLE_ALTERNATE(out_type, struct_type, name) |
Defines an alternate data type iterable section. More... | |
#define | STRUCT_SECTION_FOREACH(struct_type, iterator) |
Iterate over a specified iterable section. More... | |
Iterable Sections APIs.
#define ITERABLE_SECTION_RAM | ( | struct_type, | |
subalign | |||
) |
#include <include/linker/linker-defs.h>
Define a read-write iterable section output.
Define an output section which will set up an iterable area of equally-sized data structures. For use with STRUCT_SECTION_ITERABLE(). Input sections will be sorted by name, per ld's SORT_BY_NAME.
This macro should be used for read-write data that is modified at runtime.
Note that this keeps the symbols in the image even though they are not being directly referenced. Use this when symbols are indirectly referenced by iterating through the section.
#define ITERABLE_SECTION_RAM_GC_ALLOWED | ( | struct_type, | |
subalign | |||
) |
#include <include/linker/linker-defs.h>
Define a garbage collectable read-write iterable section output.
Define an output section which will set up an iterable area of equally-sized data structures. For use with STRUCT_SECTION_ITERABLE(). Input sections will be sorted by name, per ld's SORT_BY_NAME.
This macro should be used for read-write data that is modified at runtime.
Note that the symbols within the section can be garbage collected.
#define ITERABLE_SECTION_ROM | ( | struct_type, | |
subalign | |||
) |
#include <include/linker/linker-defs.h>
Define a read-only iterable section output.
Define an output section which will set up an iterable area of equally-sized data structures. For use with STRUCT_SECTION_ITERABLE(). Input sections will be sorted by name, per ld's SORT_BY_NAME.
This macro should be used for read-only data.
Note that this keeps the symbols in the image even though they are not being directly referenced. Use this when symbols are indirectly referenced by iterating through the section.
#define ITERABLE_SECTION_ROM_GC_ALLOWED | ( | struct_type, | |
subalign | |||
) |
#include <include/linker/linker-defs.h>
Define a garbage collectable read-only iterable section output.
Define an output section which will set up an iterable area of equally-sized data structures. For use with STRUCT_SECTION_ITERABLE(). Input sections will be sorted by name, per ld's SORT_BY_NAME.
This macro should be used for read-only data.
Note that the symbols within the section can be garbage collected.
#define STRUCT_SECTION_FOREACH | ( | struct_type, | |
iterator | |||
) |
#include <include/toolchain/common.h>
Iterate over a specified iterable section.
Iterator for structure instances gathered by STRUCT_SECTION_ITERABLE(). The linker must provide a _<struct_type>_list_start symbol and a _<struct_type>_list_end symbol to mark the start and the end of the list of struct objects to iterate over. This is normally done using ITERABLE_SECTION_ROM() or ITERABLE_SECTION_RAM() in the linker script.
#define STRUCT_SECTION_ITERABLE | ( | struct_type, | |
name | |||
) |
#include <include/toolchain/common.h>
Defines a new iterable section.
Convenience helper combining __in_section() and Z_DECL_ALIGN(). The section name is the struct type prepended with an underscore. The subsection is "static" and the subsubsection is the variable name.
In the linker script, create output sections for these using ITERABLE_SECTION_ROM() or ITERABLE_SECTION_RAM().
#define STRUCT_SECTION_ITERABLE_ALTERNATE | ( | out_type, | |
struct_type, | |||
name | |||
) |
#include <include/toolchain/common.h>
Defines an alternate data type iterable section.
Special variant of STRUCT_SECTION_ITERABLE(), for placing alternate data types within the iterable section of a specific data type. The data type sizes and semantics must be equivalent!