[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH 2/2] include/uk: add indirection to macro UK_CTOR_FUNC



If level is passed as a macro, the concatenation will paste the name
of the macro instead of constant it represents. The solution is
standard - just another layer of macro indirection.

Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>
---
 include/uk/ctors.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uk/ctors.h b/include/uk/ctors.h
index 15ec90fe..a3432e2b 100644
--- a/include/uk/ctors.h
+++ b/include/uk/ctors.h
@@ -55,11 +55,11 @@ extern const uk_ctor_func_t uk_ctortab[];
  * @param ctorf
  *   Constructor function to be called
  */
-#define UK_CTOR_FUNC(lvl, ctorf) \
+#define __UK_CTOR_FUNC(lvl, ctorf) \
                static const uk_ctor_func_t     \
                __used __section(".uk_ctortab" #lvl)    \
                __uk_ctab ## lvl ## _ ## ctorf = (ctorf)
-
+#define UK_CTOR_FUNC(lvl, ctorf) __UK_CTOR_FUNC(lvl, ctorf)
 
 #ifdef __cplusplus
 }
-- 
2.19.2


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.