aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2013-05-01 16:20:28 -0700
committerBrian Behlendorf <[email protected]>2013-05-01 16:35:47 -0700
commitab59be7bc752481db64df07c821e2ae6bf2ae71b (patch)
treee3c19b54c0761591c981bc0b9675b2f1c89e918d /include
parentf6437b60c2b2bf514a0c2e82f51fde5803b57b93 (diff)
Fix delay()
Somewhat amazingly it went unnoticed that the delay() function doesn't actually cause the task to block. Since the task state is never changed from TASK_RUNNING before schedule_timeout() the scheduler allows to task to continue running without any delay. Using schedule_timeout_interruptible() resolves the issue by correctly setting TASK_UNINTERRUPTIBLE. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/sys/timer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/timer.h b/include/sys/timer.h
index 13ef40452..2542510dd 100644
--- a/include/sys/timer.h
+++ b/include/sys/timer.h
@@ -35,7 +35,7 @@
#define ddi_get_lbolt() ((clock_t)jiffies)
#define ddi_get_lbolt64() ((int64_t)get_jiffies_64())
-#define delay(ticks) schedule_timeout((long)(ticks))
+#define delay(ticks) schedule_timeout_uninterruptible(ticks)
#define SEC_TO_TICK(sec) ((sec) * HZ)
#define MSEC_TO_TICK(ms) msecs_to_jiffies(ms)