summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2013-03-01 22:03:31 +0000
committerjhb <jhb@FreeBSD.org>2013-03-01 22:03:31 +0000
commit8857575b13cf118cc89efb1b462dd314df09c180 (patch)
tree5508497f5efa7add0b4f3b7a364b4d8c9bab98be /sys/dev
parent0542e230f823d21b65362dd6575a212e82d79bf5 (diff)
downloadFreeBSD-src-8857575b13cf118cc89efb1b462dd314df09c180.zip
FreeBSD-src-8857575b13cf118cc89efb1b462dd314df09c180.tar.gz
Replace the TDP_NOSLEEPING flag with a counter so that the
THREAD_NO_SLEEPING() and THREAD_SLEEPING_OK() macros can nest. Reviewed by: attilio
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/mps/mps.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c
index 7a3e4f7..5e41b0a 100644
--- a/sys/dev/mps/mps.c
+++ b/sys/dev/mps/mps.c
@@ -136,8 +136,8 @@ mps_diag_reset(struct mps_softc *sc,int sleep_flag)
/*Force NO_SLEEP for threads prohibited to sleep
* e.a Thread from interrupt handler are prohibited to sleep.
- */
- if(curthread->td_pflags & TDP_NOSLEEPING)
+ */
+ if (curthread->td_no_sleeping != 0)
sleep_flag = NO_SLEEP;
/* Push the magic sequence */
@@ -469,8 +469,8 @@ mps_request_sync(struct mps_softc *sc, void *req, MPI2_DEFAULT_REPLY *reply,
uint16_t *data16;
int i, count, ioc_sz, residual;
int sleep_flags = CAN_SLEEP;
-
- if(curthread->td_pflags & TDP_NOSLEEPING)
+
+ if (curthread->td_no_sleeping != 0)
sleep_flags = NO_SLEEP;
/* Step 1 */
OpenPOWER on IntegriCloud