summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_sunlabel.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-04-23 21:28:27 +0000
committerphk <phk@FreeBSD.org>2003-04-23 21:28:27 +0000
commitffd04bfbddd49c6770b05d62b4d4aa441be8e345 (patch)
tree2f6f2067280259902445ac8d739f9808ae338173 /sys/geom/geom_sunlabel.c
parent89702db8fc31b7c5f4d8f4489268abaa95cbeb52 (diff)
downloadFreeBSD-src-ffd04bfbddd49c6770b05d62b4d4aa441be8e345.zip
FreeBSD-src-ffd04bfbddd49c6770b05d62b4d4aa441be8e345.tar.gz
Introduce a g_waitfor_event() function which posts an event and waits for
it to be run (or cancelled) and use this instead of home-rolled versions.
Diffstat (limited to 'sys/geom/geom_sunlabel.c')
-rw-r--r--sys/geom/geom_sunlabel.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/geom/geom_sunlabel.c b/sys/geom/geom_sunlabel.c
index edd3e6f..a8891af 100644
--- a/sys/geom/geom_sunlabel.c
+++ b/sys/geom/geom_sunlabel.c
@@ -164,7 +164,6 @@ g_sunlabel_callconfig(void *arg, int flag)
if (!hp->error)
hp->error = g_write_data(LIST_FIRST(&hp->gp->consumer),
0, hp->label, SUN_SIZE);
- wakeup(hp);
}
/*
@@ -194,11 +193,8 @@ g_sunlabel_config(struct gctl_req *req, struct g_geom *gp, const char *verb)
error = g_access_rel(cp, 1, 1, 1);
if (error)
return (error);
- g_post_event(g_sunlabel_callconfig, &h0h0, M_WAITOK, gp, NULL);
g_topology_unlock();
- do
- tsleep(&h0h0, PRIBIO, "g_sunlabel_config", hz);
- while (h0h0.error == -1);
+ g_waitfor_event(g_sunlabel_callconfig, &h0h0, M_WAITOK, gp, NULL);
g_topology_lock();
error = h0h0.error;
g_access_rel(cp, -1, -1, -1);
OpenPOWER on IntegriCloud