diff options
author | jhb <jhb@FreeBSD.org> | 2007-02-23 23:06:10 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2007-02-23 23:06:10 +0000 |
commit | 61da08318e61ba89994efed94d3375b1bdcff69b (patch) | |
tree | 5a5982bfc22dc52ef26abd8c64d36de520251b0c /sys | |
parent | eeae7be803149057dfa3b5152d01661f0c8cd958 (diff) | |
download | FreeBSD-src-61da08318e61ba89994efed94d3375b1bdcff69b.zip FreeBSD-src-61da08318e61ba89994efed94d3375b1bdcff69b.tar.gz |
Use tsleep() rather than msleep() with a NULL mtx parameter.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/fdc/fdc.c | 18 | ||||
-rw-r--r-- | sys/geom/geom_dev.c | 2 | ||||
-rw-r--r-- | sys/geom/geom_io.c | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index c936951..7970232 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -790,7 +790,7 @@ fdc_worker(struct fdc_data *fdc) if (fdc->flags & FDC_NEEDS_RESET) { fdc->flags &= ~FDC_NEEDS_RESET; fdc_reset(fdc); - msleep(fdc, NULL, PRIBIO, "fdcrst", hz); + tsleep(fdc, PRIBIO, "fdcrst", hz); /* Discard results */ for (i = 0; i < 4; i++) fdc_sense_int(fdc, &st0, &cyl); @@ -855,7 +855,7 @@ fdc_worker(struct fdc_data *fdc) retry_line = __LINE__; if (fdc_cmd(fdc, 2, NE7CMD_RECAL, fd->fdsu, 0)) return (1); - msleep(fdc, NULL, PRIBIO, "fdrecal", hz); + tsleep(fdc, PRIBIO, "fdrecal", hz); retry_line = __LINE__; if (fdc_sense_int(fdc, &st0, &cyl) == FD_NOT_VALID) return (1); /* XXX */ @@ -867,7 +867,7 @@ fdc_worker(struct fdc_data *fdc) retry_line = __LINE__; if (fdc_cmd(fdc, 3, NE7CMD_SEEK, fd->fdsu, 1, 0)) return (1); - msleep(fdc, NULL, PRIBIO, "fdseek", hz); + tsleep(fdc, PRIBIO, "fdseek", hz); retry_line = __LINE__; if (fdc_sense_int(fdc, &st0, &cyl) == FD_NOT_VALID) return (1); /* XXX */ @@ -956,7 +956,7 @@ fdc_worker(struct fdc_data *fdc) retry_line = __LINE__; if (fdc_cmd(fdc, 2, NE7CMD_RECAL, fd->fdsu, 0)) return (1); - msleep(fdc, NULL, PRIBIO, "fdrecal", hz); + tsleep(fdc, PRIBIO, "fdrecal", hz); retry_line = __LINE__; if (fdc_sense_int(fdc, &st0, &cyl) == FD_NOT_VALID) return (1); /* XXX */ @@ -967,7 +967,7 @@ fdc_worker(struct fdc_data *fdc) fd->track = 0; /* let the heads settle */ if (settle) - msleep(fdc->fd, NULL, PRIBIO, "fdhdstl", settle); + tsleep(fdc->fd, PRIBIO, "fdhdstl", settle); } /* @@ -983,7 +983,7 @@ fdc_worker(struct fdc_data *fdc) retry_line = __LINE__; if (fdc_cmd(fdc, 3, NE7CMD_SEEK, fd->fdsu, descyl, 0)) return (1); - msleep(fdc, NULL, PRIBIO, "fdseek", hz); + tsleep(fdc, PRIBIO, "fdseek", hz); retry_line = __LINE__; if (fdc_sense_int(fdc, &st0, &cyl) == FD_NOT_VALID) return (1); /* XXX */ @@ -994,7 +994,7 @@ fdc_worker(struct fdc_data *fdc) } /* let the heads settle */ if (settle) - msleep(fdc->fd, NULL, PRIBIO, "fdhdstl", settle); + tsleep(fdc->fd, PRIBIO, "fdhdstl", settle); } fd->track = cylinder; @@ -1080,7 +1080,7 @@ fdc_worker(struct fdc_data *fdc) } /* Wait for interrupt */ - i = msleep(fdc, NULL, PRIBIO, "fddata", hz); + i = tsleep(fdc, PRIBIO, "fddata", hz); /* PIO if the read looks good */ if (i == 0 && (fdc->flags & FDC_NODMA) && (bp->bio_cmd & BIO_READ)) @@ -1279,7 +1279,7 @@ fdmisccmd(struct fd_data *fd, u_int cmd, void *data) fd_enqueue(fd, bp); do { - msleep(bp, NULL, PRIBIO, "fdwait", hz); + tsleep(bp, PRIBIO, "fdwait", hz); } while (!(bp->bio_flags & BIO_DONE)); error = bp->bio_error; diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index 7b15559..c87dcdc 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -416,7 +416,7 @@ g_dev_orphan(struct g_consumer *cp) /* Wait for the cows to come home */ while (cp->nstart != cp->nend) - msleep(&dev, NULL, PRIBIO, "gdevorphan", hz / 10); + tsleep(&dev, PRIBIO, "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 e8e00ed..a074534 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); - msleep(&error, NULL, PRIBIO, "g_down", hz/10); + tsleep(&error, PRIBIO, "g_down", hz/10); pace--; } error = g_io_check(bp); |