lib: actually propagate MGROUP args

Well, this was only checked for exit status, which we didn't really
observe... so, uh, yeah, not particularly noticeable it wasn't even
wired up...

clang-format off/on added to not get formatting wrecked on this.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2024-07-26 16:37:13 -07:00
parent 40dce0be6a
commit b7420c46de

View File

@ -67,6 +67,8 @@ struct memgroup {
* but MGROUP_* aren't.
*/
/* clang-format off */
#define DECLARE_MGROUP(name) extern struct memgroup _mg_##name
#define _DEFINE_MGROUP(mname, desc, ...) \
struct memgroup _mg_##mname _DATA_SECTION("mgroups") = { \
@ -75,6 +77,7 @@ struct memgroup {
.next = NULL, \
.insert = NULL, \
.ref = NULL, \
__VA_ARGS__ \
}; \
static void _mginit_##mname(void) __attribute__((_CONSTRUCTOR(1000))); \
static void _mginit_##mname(void) \
@ -136,6 +139,8 @@ struct memgroup {
DEFINE_MTYPE_ATTR(group, name, static, desc) \
/* end */
/* clang-format on */
DECLARE_MGROUP(LIB);
DECLARE_MTYPE(TMP);
DECLARE_MTYPE(TMP_TTABLE);