diff options
Diffstat (limited to 'kernel/kthread.c')
-rw-r--r-- | kernel/kthread.c | 5 |
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 | } |
225 | EXPORT_SYMBOL(kthread_stop); | 230 | EXPORT_SYMBOL(kthread_stop); |