summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2005-01-07 21:49:52 -0800
committerLinus Torvalds <torvalds@evo.osdl.org>2005-01-07 21:49:52 -0800
commita298f2eefe18888907e9feffb477b66843912d10 (patch)
tree9bc83a440552e8a9c91cd1590b2db0c14355eb30 /include/linux
parentf6aaca35e0aa4c7e3de79ace85f7380f4d451648 (diff)
[PATCH] sched: add cond_resched_softirq()
It adds cond_resched_softirq() which can be used by _process context_ softirqs-disabled codepaths to preempt if necessary. The function will enable softirqs before scheduling. (Later patches will use this primitive.) Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c69d26d50fb0..fa3cb372c554 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1069,9 +1069,12 @@ static inline int need_resched(void)
* cond_resched() and cond_resched_lock(): latency reduction via
* explicit rescheduling in places that are safe. The return
* value indicates whether a reschedule was done in fact.
+ * cond_resched_lock() will drop the spinlock before scheduling,
+ * cond_resched_softirq() will enable bhs before scheduling.
*/
extern int cond_resched(void);
extern int cond_resched_lock(spinlock_t * lock);
+extern int cond_resched_softirq(void);
/*
* Does a critical section need to be broken due to another