diff options
author | phk <phk@FreeBSD.org> | 2003-04-23 20:54:42 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-04-23 20:54:42 +0000 |
commit | 7a7d4061363e642b99e4cdb2279fe3ba539e8165 (patch) | |
tree | 9b69241966c7cdaba026b6983cb54755617cabcc | |
parent | 3bbfe9f43b9f428fa76cf6b43be961ff03071025 (diff) | |
download | FreeBSD-src-7a7d4061363e642b99e4cdb2279fe3ba539e8165.zip FreeBSD-src-7a7d4061363e642b99e4cdb2279fe3ba539e8165.tar.gz |
More of the event stuff can now be private to geom_event.c
-rw-r--r-- | sys/geom/geom_event.c | 12 | ||||
-rw-r--r-- | sys/geom/geom_int.h | 11 | ||||
-rw-r--r-- | sys/geom/geom_kern.c | 2 |
3 files changed, 11 insertions, 14 deletions
diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c index ec34c87..babff65 100644 --- a/sys/geom/geom_event.c +++ b/sys/geom/geom_event.c @@ -52,12 +52,23 @@ #include <geom/geom.h> #include <geom/geom_int.h> +TAILQ_HEAD(event_tailq_head, g_event); + static struct event_tailq_head g_events = TAILQ_HEAD_INITIALIZER(g_events); static u_int g_pending_events; static TAILQ_HEAD(,g_provider) g_doorstep = TAILQ_HEAD_INITIALIZER(g_doorstep); static struct mtx g_eventlock; static struct sx g_eventstall; +#define G_N_EVENTREFS 20 + +struct g_event { + TAILQ_ENTRY(g_event) events; + void *arg; + g_event_t *func; + void *ref[G_N_EVENTREFS]; +}; + void g_waitidle(void) { @@ -243,7 +254,6 @@ g_post_event(g_event_t *func, void *arg, int flag, ...) return (0); } - void g_event_init() { diff --git a/sys/geom/geom_int.h b/sys/geom/geom_int.h index 23e5597..952b6c6 100644 --- a/sys/geom/geom_int.h +++ b/sys/geom/geom_int.h @@ -37,9 +37,7 @@ LIST_HEAD(class_list_head, g_class); TAILQ_HEAD(g_tailq_head, g_geom); -TAILQ_HEAD(event_tailq_head, g_event); -extern struct event_tailq_head events; extern int g_collectstats; extern int g_debugflags; /* @@ -53,15 +51,6 @@ extern int g_debugflags; #define G_F_DISKIOCTL 64 #define G_F_CTLDUMP 128 -#define G_N_EVENTREFS 20 - -struct g_event { - TAILQ_ENTRY(g_event) events; - void *arg; - g_event_t *func; - void *ref[G_N_EVENTREFS]; -}; - /* * We actually have a number of drivers sharing the same major number * so we coordinate the major/minor usage here diff --git a/sys/geom/geom_kern.c b/sys/geom/geom_kern.c index 8f87260..38531b7 100644 --- a/sys/geom/geom_kern.c +++ b/sys/geom/geom_kern.c @@ -245,5 +245,3 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, g_consumer, CTLFLAG_RD, 0, sizeof(struct g_consumer), ""); SYSCTL_INT(_debug_sizeof, OID_AUTO, g_bioq, CTLFLAG_RD, 0, sizeof(struct g_bioq), ""); -SYSCTL_INT(_debug_sizeof, OID_AUTO, g_event, CTLFLAG_RD, - 0, sizeof(struct g_event), ""); |