summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2007-02-27 17:23:29 +0000
committerjhb <jhb@FreeBSD.org>2007-02-27 17:23:29 +0000
commit9081d442434a29679b0bafe249708a1bd48bbfde (patch)
treea0597a39b0c2d93af237d119ce7da913a8a44962 /sys/geom
parent3a7dab48bd395f66d9af79696af0534c63ae92f2 (diff)
downloadFreeBSD-src-9081d442434a29679b0bafe249708a1bd48bbfde.zip
FreeBSD-src-9081d442434a29679b0bafe249708a1bd48bbfde.tar.gz
Use pause() rather than tsleep() on stack variables and function pointers.
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/geom_dev.c6
-rw-r--r--sys/geom/geom_io.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c
index c87dcdc..a9752648 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -228,7 +228,7 @@ g_dev_close(struct cdev *dev, int flags, int fmt, struct thread *td)
break;
if (cp->nstart == cp->nend)
break;
- tsleep(&i, PRIBIO, "gdevwclose", hz / 10);
+ pause("gdevwclose", hz / 10);
i += hz / 10;
}
if (cp->acr == 0 && cp->acw == 0 && cp->nstart != cp->nend) {
@@ -366,7 +366,7 @@ g_dev_strategy(struct bio *bp)
bp2 = g_clone_bio(bp);
if (bp2 != NULL)
break;
- tsleep(&bp, PRIBIO, "gdstrat", hz / 10);
+ pause("gdstrat", hz / 10);
}
KASSERT(bp2 != NULL, ("XXX: ENOMEM in a bad place"));
bp2->bio_done = g_dev_done;
@@ -416,7 +416,7 @@ g_dev_orphan(struct g_consumer *cp)
/* Wait for the cows to come home */
while (cp->nstart != cp->nend)
- tsleep(&dev, PRIBIO, "gdevorphan", hz / 10);
+ pause("gdevorphan", hz / 10);
if (cp->acr > 0 || cp->acw > 0 || cp->ace > 0)
g_access(cp, -cp->acr, -cp->acw, -cp->ace);
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index a074534..beb74fe 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -492,7 +492,7 @@ g_io_schedule_down(struct thread *tp __unused)
g_bioq_unlock(&g_bio_run_down);
if (pace > 0) {
CTR1(KTR_GEOM, "g_down pacing self (pace %d)", pace);
- tsleep(&error, PRIBIO, "g_down", hz/10);
+ pause("g_down", hz/10);
pace--;
}
error = g_io_check(bp);
OpenPOWER on IntegriCloud