diff options
author | jhb <jhb@FreeBSD.org> | 2007-02-27 17:15:39 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2007-02-27 17:15:39 +0000 |
commit | e946f637f602f984354c9421c2e61b9e1a6dbd10 (patch) | |
tree | 9728e744da4c9fb5fa94b80513406b2bb817dc02 | |
parent | a0324781f288a9ee994f0fc87aa2adb515d8d393 (diff) | |
download | FreeBSD-src-e946f637f602f984354c9421c2e61b9e1a6dbd10.zip FreeBSD-src-e946f637f602f984354c9421c2e61b9e1a6dbd10.tar.gz |
Use tsleep() rather than msleep() with a NULL mtx.
-rw-r--r-- | sys/arm/at91/at91_spi.c | 2 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_target.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arm/at91/at91_spi.c b/sys/arm/at91/at91_spi.c index d3ee67d..2dfbc8e 100644 --- a/sys/arm/at91/at91_spi.c +++ b/sys/arm/at91/at91_spi.c @@ -248,7 +248,7 @@ at91_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) rxdone = sc->rxdone; do { - err = msleep(&sc->rxdone, NULL, PCATCH | PZERO, "spi", hz); + err = tsleep(&sc->rxdone, PCATCH | PZERO, "spi", hz); } while (rxdone == sc->rxdone && err != EINTR); WR4(sc, PDC_PTCR, PDC_PTCR_TXTDIS | PDC_PTCR_RXTDIS); if (err == 0) { diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c index aea6922..670fb0e 100644 --- a/sys/cam/scsi/scsi_target.c +++ b/sys/cam/scsi/scsi_target.c @@ -810,8 +810,8 @@ targread(struct cdev *dev, struct uio *uio, int ioflag) user_descr = TAILQ_FIRST(abort_queue); while (ccb_h == NULL && user_descr == NULL) { if ((ioflag & IO_NDELAY) == 0) { - error = msleep(user_queue, NULL, - PRIBIO | PCATCH, "targrd", 0); + error = tsleep(user_queue, + PRIBIO | PCATCH, "targrd", 0); ccb_h = TAILQ_FIRST(user_queue); user_descr = TAILQ_FIRST(abort_queue); if (error != 0) { @@ -1037,7 +1037,7 @@ abort_all_pending(struct targ_softc *softc) /* If we aborted at least one pending CCB ok, wait for it. */ if (cab.ccb_h.status == CAM_REQ_CMP) { - msleep(&softc->pending_ccb_queue, NULL, + tsleep(&softc->pending_ccb_queue, PRIBIO | PCATCH, "tgabrt", 0); } |