linker: add iterable section macros
For iterable areas defined with Z_STRUCT_SECTION_ITERABLE(), the corresponding output section in the linker script is just boilerplate. Add macros to make these definitions simpler. Unfortunately, we have a fair number of iterable sections not defined with Z_STRUCT_SECTION_ITERABLE(), this patch does not address this. The output sections are all named <struct name>_area, update sanitylib.py with this. sys_sem with no userspace, and k_lifo/k_fifo are special cases where different data types that are all equivalent need to be put in the same iterable area. Add Z_STRUCT_SECTION_ITERABLE_ALTERNATE() for this special case. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
973487fdad
commit
45979dafb4
7 changed files with 84 additions and 154 deletions
|
@ -2773,7 +2773,7 @@ struct k_fifo {
|
|||
* @param name Name of the FIFO queue.
|
||||
*/
|
||||
#define K_FIFO_DEFINE(name) \
|
||||
Z_STRUCT_SECTION_ITERABLE(k_fifo, name) = \
|
||||
Z_STRUCT_SECTION_ITERABLE_ALTERNATE(k_queue, k_fifo, name) = \
|
||||
Z_FIFO_INITIALIZER(name)
|
||||
|
||||
/** @} */
|
||||
|
@ -2879,7 +2879,7 @@ struct k_lifo {
|
|||
* @param name Name of the fifo.
|
||||
*/
|
||||
#define K_LIFO_DEFINE(name) \
|
||||
Z_STRUCT_SECTION_ITERABLE(k_lifo, name) = \
|
||||
Z_STRUCT_SECTION_ITERABLE_ALTERNATE(k_queue, k_lifo, name) = \
|
||||
Z_LIFO_INITIALIZER(name)
|
||||
|
||||
/** @} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue