More of the event stuff can now be private to geom_event.c
This commit is contained in:
parent
8cd1535a24
commit
a974614b05
@ -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()
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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), "");
|
||||
|
Loading…
x
Reference in New Issue
Block a user