aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-07-26 07:40:43 -0400
committerIngo Molnar <mingo@elte.hu>2007-07-26 07:40:43 -0400
commite107be36efb2a233833e8c9899039a370e4b2318 (patch)
tree655955aa81aefeff441c412adaafe9b51a00ff56 /include/linux/sched.h
parentb47e8608a08766ef8121cd747d3aaf6c3dc22649 (diff)
[PATCH] sched: arch preempt notifier mechanism
This adds a general mechanism whereby a task can request the scheduler to notify it whenever it is preempted or scheduled back in. This allows the task to swap any special-purpose registers like the fpu or Intel's VT registers. Signed-off-by: Avi Kivity <avi@qumranet.com> [ mingo@elte.hu: fixes, cleanups ] Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 7c61b50823fa..7a4de8768748 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -935,6 +935,11 @@ struct task_struct {
935 struct sched_class *sched_class; 935 struct sched_class *sched_class;
936 struct sched_entity se; 936 struct sched_entity se;
937 937
938#ifdef CONFIG_PREEMPT_NOTIFIERS
939 /* list of struct preempt_notifier: */
940 struct hlist_head preempt_notifiers;
941#endif
942
938 unsigned short ioprio; 943 unsigned short ioprio;
939#ifdef CONFIG_BLK_DEV_IO_TRACE 944#ifdef CONFIG_BLK_DEV_IO_TRACE
940 unsigned int btrace_seq; 945 unsigned int btrace_seq;