diff options
author | Markus Metzger <markus.t.metzger@intel.com> | 2009-04-03 10:43:34 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-07 07:36:12 -0400 |
commit | a26b89f05d194413c7238e0bea071054f6b5d3c8 (patch) | |
tree | 8a2efbabce49ed747fe9b54e282e04b82d1b9982 /include/linux/sched.h | |
parent | cac94f979326212831c0ea44ed9ea1622b4f4e93 (diff) |
sched, hw-branch-tracer: add wait_task_context_switch() function to sched.h
Add a function to wait until some other task has been
switched out at least once.
This differs from wait_task_inactive() subtly, in that the
latter will wait until the task has left the CPU.
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: markus.t.metzger@gmail.com
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144549.794157000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index b94f3541f67b..a5b9a83065fa 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1993,8 +1993,10 @@ extern void set_task_comm(struct task_struct *tsk, char *from); | |||
1993 | extern char *get_task_comm(char *to, struct task_struct *tsk); | 1993 | extern char *get_task_comm(char *to, struct task_struct *tsk); |
1994 | 1994 | ||
1995 | #ifdef CONFIG_SMP | 1995 | #ifdef CONFIG_SMP |
1996 | extern void wait_task_context_switch(struct task_struct *p); | ||
1996 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); | 1997 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); |
1997 | #else | 1998 | #else |
1999 | static inline void wait_task_context_switch(struct task_struct *p) {} | ||
1998 | static inline unsigned long wait_task_inactive(struct task_struct *p, | 2000 | static inline unsigned long wait_task_inactive(struct task_struct *p, |
1999 | long match_state) | 2001 | long match_state) |
2000 | { | 2002 | { |