aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kthread.c
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2008-10-21 14:42:20 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2008-10-21 14:42:20 -0400
commitb876d08f816527af257e13d89fb0d3b4b849223c (patch)
tree40569f568230f918ca55f04b355e251747f913ed /kernel/kthread.c
parentb364776ad1208a71f0c53578c84619a395412a8d (diff)
parent2515ddc6db8eb49a79f0fe5e67ff09ac7c81eab4 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/pci/dmar.c
Diffstat (limited to 'kernel/kthread.c')
-rw-r--r--kernel/kthread.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/kthread.c b/kernel/kthread.c
index 14ec64fe175a..8e7a7ce3ed0a 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -13,6 +13,7 @@
13#include <linux/file.h> 13#include <linux/file.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/mutex.h> 15#include <linux/mutex.h>
16#include <trace/sched.h>
16 17
17#define KTHREAD_NICE_LEVEL (-5) 18#define KTHREAD_NICE_LEVEL (-5)
18 19
@@ -205,6 +206,8 @@ int kthread_stop(struct task_struct *k)
205 /* It could exit after stop_info.k set, but before wake_up_process. */ 206 /* It could exit after stop_info.k set, but before wake_up_process. */
206 get_task_struct(k); 207 get_task_struct(k);
207 208
209 trace_sched_kthread_stop(k);
210
208 /* Must init completion *before* thread sees kthread_stop_info.k */ 211 /* Must init completion *before* thread sees kthread_stop_info.k */
209 init_completion(&kthread_stop_info.done); 212 init_completion(&kthread_stop_info.done);
210 smp_wmb(); 213 smp_wmb();
@@ -220,6 +223,8 @@ int kthread_stop(struct task_struct *k)
220 ret = kthread_stop_info.err; 223 ret = kthread_stop_info.err;
221 mutex_unlock(&kthread_stop_lock); 224 mutex_unlock(&kthread_stop_lock);
222 225
226 trace_sched_kthread_stop_ret(ret);
227
223 return ret; 228 return ret;
224} 229}
225EXPORT_SYMBOL(kthread_stop); 230EXPORT_SYMBOL(kthread_stop);