mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Give GEOM modules a chance to specify their own init routine, in case they
have special requirements. Sponsored by: DARPA & NAI Labs.
This commit is contained in:
parent
6f20c9faab
commit
e970552d3a
1 changed files with 4 additions and 1 deletions
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue