diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2024-07-26 16:37:13 -0700 | 
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2024-10-17 13:58:39 +0200 | 
| commit | b7420c46defaa4209755346221e57d610bfdda3e (patch) | |
| tree | bda5ea667e8bd341ba5f3cd79704e2ee77c2bc34 /lib/memory.h | |
| parent | 40dce0be6a8f1cad15fce434177b48f9e69b96dd (diff) | |
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>
Diffstat (limited to 'lib/memory.h')
| -rw-r--r-- | lib/memory.h | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/memory.h b/lib/memory.h index 8e8c61da04..957a9611b5 100644 --- a/lib/memory.h +++ b/lib/memory.h @@ -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);  | 
