35c35
< * $FreeBSD: head/sys/geom/geom.h 115468 2003-05-31 16:59:27Z phk $
---
> * $FreeBSD: head/sys/geom/geom.h 115473 2003-05-31 18:13:07Z phk $
46a47
> #include <sys/module.h>
62a64,65
> typedef void g_init_t (struct g_class *mp);
> typedef void g_fini_t (struct g_class *mp);
87a91,92
> g_init_t *init;
> g_fini_t *fini;
196d200
< void g_add_class(struct g_class *mp);
217a222,223
> int g_modevent(module_t, int, void *);
>
292,293c298,302
< #define DECLARE_GEOM_CLASS_INIT(class, name, init) \
< SYSINIT(name, SI_SUB_DRIVERS, SI_ORDER_FIRST, init, NULL);
---
> #define DECLARE_GEOM_CLASS(class, name) \
> static moduledata_t name##_mod = { \
> #name, g_modevent, &class \
> }; \
> DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
295,304d303
< #define DECLARE_GEOM_CLASS(class, name) \
< static void \
< name##init(void) \
< { \
< mtx_unlock(&Giant); \
< g_add_class(&class); \
< mtx_lock(&Giant); \
< } \
< DECLARE_GEOM_CLASS_INIT(class, name, name##init);
<
< * $FreeBSD: head/sys/geom/geom.h 115468 2003-05-31 16:59:27Z phk $
---
> * $FreeBSD: head/sys/geom/geom.h 115473 2003-05-31 18:13:07Z phk $
46a47
> #include <sys/module.h>
62a64,65
> typedef void g_init_t (struct g_class *mp);
> typedef void g_fini_t (struct g_class *mp);
87a91,92
> g_init_t *init;
> g_fini_t *fini;
196d200
< void g_add_class(struct g_class *mp);
217a222,223
> int g_modevent(module_t, int, void *);
>
292,293c298,302
< #define DECLARE_GEOM_CLASS_INIT(class, name, init) \
< SYSINIT(name, SI_SUB_DRIVERS, SI_ORDER_FIRST, init, NULL);
---
> #define DECLARE_GEOM_CLASS(class, name) \
> static moduledata_t name##_mod = { \
> #name, g_modevent, &class \
> }; \
> DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
295,304d303
< #define DECLARE_GEOM_CLASS(class, name) \
< static void \
< name##init(void) \
< { \
< mtx_unlock(&Giant); \
< g_add_class(&class); \
< mtx_lock(&Giant); \
< } \
< DECLARE_GEOM_CLASS_INIT(class, name, name##init);
<