summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_sleepqueue.c
diff options
context:
space:
mode:
authordavide <davide@FreeBSD.org>2013-03-04 11:51:46 +0000
committerdavide <davide@FreeBSD.org>2013-03-04 11:51:46 +0000
commita89343717563c6d92425a7ea3e237d9023d6ba31 (patch)
tree5be203791a3916b38c237926ad6803d00321c31a /sys/kern/subr_sleepqueue.c
parent76f3f2a1e690c4c298a9b4baf95a20c6e7e9be79 (diff)
downloadFreeBSD-src-a89343717563c6d92425a7ea3e237d9023d6ba31.zip
FreeBSD-src-a89343717563c6d92425a7ea3e237d9023d6ba31.tar.gz
MFcalloutng:
Convert sleepqueue(9) bits to the new callout KPI. Take advantage of the possibility to run callback directly from hw interrupt context. Sponsored by: Google Summer of Code 2012, iXsystems inc. Tested by: flo, marius, ian, markj, Fabian Keil
Diffstat (limited to 'sys/kern/subr_sleepqueue.c')
-rw-r--r--sys/kern/subr_sleepqueue.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c
index f187544..3e1c0c3 100644
--- a/sys/kern/subr_sleepqueue.c
+++ b/sys/kern/subr_sleepqueue.c
@@ -361,7 +361,8 @@ sleepq_add(void *wchan, struct lock_object *lock, const char *wmesg, int flags,
* sleep queue after timo ticks if the thread has not already been awakened.
*/
void
-sleepq_set_timeout(void *wchan, int timo)
+sleepq_set_timeout_sbt(void *wchan, sbintime_t sbt, sbintime_t pr,
+ int flags)
{
struct sleepqueue_chain *sc;
struct thread *td;
@@ -372,7 +373,8 @@ sleepq_set_timeout(void *wchan, int timo)
MPASS(TD_ON_SLEEPQ(td));
MPASS(td->td_sleepqueue == NULL);
MPASS(wchan != NULL);
- callout_reset_curcpu(&td->td_slpcallout, timo, sleepq_timeout, td);
+ callout_reset_sbt_on(&td->td_slpcallout, sbt, pr,
+ sleepq_timeout, td, PCPU_GET(cpuid), flags | C_DIRECT_EXEC);
}
/*
OpenPOWER on IntegriCloud