Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ciss/ciss.c
Show First 20 Lines • Show All 2,408 Lines • ▼ Show 20 Lines | ciss_wait_request(struct ciss_request *cr, int timeout) | ||||
debug_called(2); | debug_called(2); | ||||
cr->cr_flags |= CISS_REQ_SLEEP; | cr->cr_flags |= CISS_REQ_SLEEP; | ||||
if ((error = ciss_start(cr)) != 0) | if ((error = ciss_start(cr)) != 0) | ||||
return(error); | return(error); | ||||
while ((cr->cr_flags & CISS_REQ_SLEEP) && (error != EWOULDBLOCK)) { | while ((cr->cr_flags & CISS_REQ_SLEEP) && (error != EWOULDBLOCK)) { | ||||
error = msleep(cr, &cr->cr_sc->ciss_mtx, PRIBIO, "cissREQ", (timeout * hz) / 1000); | error = msleep_sbt(cr, &cr->cr_sc->ciss_mtx, PRIBIO, "cissREQ", | ||||
SBT_1MS * timeout, 0, 0); | |||||
} | } | ||||
return(error); | return(error); | ||||
} | } | ||||
#if 0 | #if 0 | ||||
/************************************************************************ | /************************************************************************ | ||||
* Abort a request. Note that a potential exists here to race the | * Abort a request. Note that a potential exists here to race the | ||||
* request being completed; the caller must deal with this. | * request being completed; the caller must deal with this. | ||||
▲ Show 20 Lines • Show All 2,317 Lines • Show Last 20 Lines |