diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:56:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:56:24 +0000 |
commit | 54de8bbe36d7d968c6367939277942518bd4e11f (patch) | |
tree | 924f8c16d9c8831679f355b88c620b9b356c9d5a /lib/memory.h | |
parent | Adding debian version 10.0.1-0.1. (diff) | |
download | frr-54de8bbe36d7d968c6367939277942518bd4e11f.tar.xz frr-54de8bbe36d7d968c6367939277942518bd4e11f.zip |
Merging upstream version 10.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/memory.h')
-rw-r--r-- | lib/memory.h | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/lib/memory.h b/lib/memory.h index ba437eb..65b99a5 100644 --- a/lib/memory.h +++ b/lib/memory.h @@ -69,14 +69,12 @@ struct memgroup { #define DECLARE_MGROUP(name) extern struct memgroup _mg_##name #define _DEFINE_MGROUP(mname, desc, ...) \ - struct memgroup _mg_##mname \ - __attribute__((section(".data.mgroups"))) = { \ - .name = desc, \ - .types = NULL, \ - .next = NULL, \ - .insert = NULL, \ - .ref = NULL, \ - __VA_ARGS__ \ + struct memgroup _mg_##mname _DATA_SECTION("mgroups") = { \ + .name = desc, \ + .types = NULL, \ + .next = NULL, \ + .insert = NULL, \ + .ref = NULL, \ }; \ static void _mginit_##mname(void) __attribute__((_CONSTRUCTOR(1000))); \ static void _mginit_##mname(void) \ @@ -105,13 +103,12 @@ struct memgroup { /* end */ #define DEFINE_MTYPE_ATTR(group, mname, attr, desc) \ - attr struct memtype MTYPE_##mname[1] \ - __attribute__((section(".data.mtypes"))) = { { \ - .name = desc, \ - .next = NULL, \ - .n_alloc = 0, \ - .size = 0, \ - .ref = NULL, \ + attr struct memtype MTYPE_##mname[1] _DATA_SECTION("mtypes") = { { \ + .name = desc, \ + .next = NULL, \ + .n_alloc = 0, \ + .size = 0, \ + .ref = NULL, \ } }; \ static void _mtinit_##mname(void) __attribute__((_CONSTRUCTOR(1001))); \ static void _mtinit_##mname(void) \ |