summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2003-04-23 20:54:42 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2003-04-23 20:54:42 +0000
commita974614b05722d8861c3aca7afa70b16fdd1c91f (patch)
tree9b69241966c7cdaba026b6983cb54755617cabcc
parent8cd1535a247ade29be99fe8521d0740fc79e68cd (diff)
Notes
-rw-r--r--sys/geom/geom_event.c12
-rw-r--r--sys/geom/geom_int.h11
-rw-r--r--sys/geom/geom_kern.c2
3 files changed, 11 insertions, 14 deletions
diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c
index ec34c878f33d..babff65431f4 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 23e5597d5c11..952b6c6d8572 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 8f87260565b9..38531b75cecd 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), "");