From a95c8cfb2412c3227f0053ecf135288ee8023a27 Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 13 Oct 2002 18:42:35 +0000 Subject: Give GEOM modules a chance to specify their own init routine, in case they have special requirements. Sponsored by: DARPA & NAI Labs. --- sys/geom/geom.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/geom/geom.h b/sys/geom/geom.h index c053fcb..ad63e4b 100644 --- a/sys/geom/geom.h +++ b/sys/geom/geom.h @@ -287,6 +287,9 @@ extern struct sx topology_lock; sx_assert(&topology_lock, SX_XLOCKED); \ } while (0) +#define DECLARE_GEOM_CLASS_INIT(class, name, init) \ + SYSINIT(name, SI_SUB_PSEUDO, SI_ORDER_FIRST, init, NULL); + #define DECLARE_GEOM_CLASS(class, name) \ static void \ name##init(void) \ @@ -295,7 +298,7 @@ extern struct sx topology_lock; g_add_class(&class); \ mtx_lock(&Giant); \ } \ - SYSINIT(name, SI_SUB_PSEUDO, SI_ORDER_FIRST, name##init, NULL); + DECLARE_GEOM_CLASS_INIT(class, name, name##init); #endif /* _KERNEL */ -- cgit v1.1