Use tsleep() rather than msleep() with a NULL mtx.

This commit is contained in:
John Baldwin 2007-02-27 17:15:39 +00:00
parent e5f015499d
commit 552e9b06bb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=167082
2 changed files with 4 additions and 4 deletions

View file

@ -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) {

View file

@ -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);
}