[rtems-libbsd commit] EVENTHANDLER(9): Avoid multiple definition errors
Sebastian Huber
sebh at rtems.org
Mon Feb 10 18:42:22 UTC 2020
Module: rtems-libbsd
Branch: master
Commit: eb5dc4f658601ba6b29539581fd99fa50f48956d
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=eb5dc4f658601ba6b29539581fd99fa50f48956d
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Feb 10 18:13:07 2020 +0100
EVENTHANDLER(9): Avoid multiple definition errors
---
freebsd/sys/sys/eventhandler.h | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/freebsd/sys/sys/eventhandler.h b/freebsd/sys/sys/eventhandler.h
index 9e3ff01..5d02677 100644
--- a/freebsd/sys/sys/eventhandler.h
+++ b/freebsd/sys/sys/eventhandler.h
@@ -120,14 +120,12 @@ SYSINIT(name ## _ehl_init, SI_SUB_EVENTHANDLER, SI_ORDER_ANY, \
} while (0)
#define EVENTHANDLER_DEFINE(name, func, arg, priority) \
- static eventhandler_tag name ## _tag; \
- static void name ## _evh_init(void *ctx) \
+ static void name ## func(void *ctx) \
{ \
- name ## _tag = EVENTHANDLER_REGISTER(name, func, ctx, \
- priority); \
+ EVENTHANDLER_REGISTER(name, func, ctx, priority); \
} \
- SYSINIT(name ## _evh_init, SI_SUB_CONFIGURE, SI_ORDER_ANY, \
- name ## _evh_init, arg); \
+ SYSINIT(name ## func, SI_SUB_CONFIGURE, SI_ORDER_ANY, \
+ name ## func, arg); \
struct __hack
#define EVENTHANDLER_INVOKE(name, ...) \
More information about the vc
mailing list