aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2009-04-03 10:43:34 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-07 07:36:12 -0400
commita26b89f05d194413c7238e0bea071054f6b5d3c8 (patch)
tree8a2efbabce49ed747fe9b54e282e04b82d1b9982 /include
parentcac94f979326212831c0ea44ed9ea1622b4f4e93 (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')
-rw-r--r--include/linux/sched.h2
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);
1993extern char *get_task_comm(char *to, struct task_struct *tsk); 1993extern char *get_task_comm(char *to, struct task_struct *tsk);
1994 1994
1995#ifdef CONFIG_SMP 1995#ifdef CONFIG_SMP
1996extern void wait_task_context_switch(struct task_struct *p);
1996extern unsigned long wait_task_inactive(struct task_struct *, long match_state); 1997extern unsigned long wait_task_inactive(struct task_struct *, long match_state);
1997#else 1998#else
1999static inline void wait_task_context_switch(struct task_struct *p) {}
1998static inline unsigned long wait_task_inactive(struct task_struct *p, 2000static inline unsigned long wait_task_inactive(struct task_struct *p,
1999 long match_state) 2001 long match_state)
2000{ 2002{