diff options
author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-09-22 19:49:27 -0400 |
---|---|---|
committer | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-09-22 19:49:27 -0400 |
commit | f056878332a91ed984a116bad4e7d49aefff9e6e (patch) | |
tree | 572f4757c8e7811d45e0be0c2ae529c78fb63441 /kernel/kthread.c | |
parent | 3961f7c3cf247eee5df7fabadc7a40f2deeb98f3 (diff) | |
parent | 7fa07729e439a6184bd824746d06a49cca553f15 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/power/wm97xx_battery.c
Diffstat (limited to 'kernel/kthread.c')
-rw-r--r-- | kernel/kthread.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/kernel/kthread.c b/kernel/kthread.c index 9b1a7de2697..5fe709982ca 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c | |||
@@ -16,8 +16,6 @@ | |||
16 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
17 | #include <trace/events/sched.h> | 17 | #include <trace/events/sched.h> |
18 | 18 | ||
19 | #define KTHREAD_NICE_LEVEL (-5) | ||
20 | |||
21 | static DEFINE_SPINLOCK(kthread_create_lock); | 19 | static DEFINE_SPINLOCK(kthread_create_lock); |
22 | static LIST_HEAD(kthread_create_list); | 20 | static LIST_HEAD(kthread_create_list); |
23 | struct task_struct *kthreadd_task; | 21 | struct task_struct *kthreadd_task; |
@@ -145,7 +143,6 @@ struct task_struct *kthread_create(int (*threadfn)(void *data), | |||
145 | * The kernel thread should not inherit these properties. | 143 | * The kernel thread should not inherit these properties. |
146 | */ | 144 | */ |
147 | sched_setscheduler_nocheck(create.result, SCHED_NORMAL, ¶m); | 145 | sched_setscheduler_nocheck(create.result, SCHED_NORMAL, ¶m); |
148 | set_user_nice(create.result, KTHREAD_NICE_LEVEL); | ||
149 | set_cpus_allowed_ptr(create.result, cpu_all_mask); | 146 | set_cpus_allowed_ptr(create.result, cpu_all_mask); |
150 | } | 147 | } |
151 | return create.result; | 148 | return create.result; |
@@ -180,10 +177,12 @@ EXPORT_SYMBOL(kthread_bind); | |||
180 | * @k: thread created by kthread_create(). | 177 | * @k: thread created by kthread_create(). |
181 | * | 178 | * |
182 | * Sets kthread_should_stop() for @k to return true, wakes it, and | 179 | * Sets kthread_should_stop() for @k to return true, wakes it, and |
183 | * waits for it to exit. Your threadfn() must not call do_exit() | 180 | * waits for it to exit. This can also be called after kthread_create() |
184 | * itself if you use this function! This can also be called after | 181 | * instead of calling wake_up_process(): the thread will exit without |
185 | * kthread_create() instead of calling wake_up_process(): the thread | 182 | * calling threadfn(). |
186 | * will exit without calling threadfn(). | 183 | * |
184 | * If threadfn() may call do_exit() itself, the caller must ensure | ||
185 | * task_struct can't go away. | ||
187 | * | 186 | * |
188 | * Returns the result of threadfn(), or %-EINTR if wake_up_process() | 187 | * Returns the result of threadfn(), or %-EINTR if wake_up_process() |
189 | * was never called. | 188 | * was never called. |
@@ -219,7 +218,6 @@ int kthreadd(void *unused) | |||
219 | /* Setup a clean context for our children to inherit. */ | 218 | /* Setup a clean context for our children to inherit. */ |
220 | set_task_comm(tsk, "kthreadd"); | 219 | set_task_comm(tsk, "kthreadd"); |
221 | ignore_signals(tsk); | 220 | ignore_signals(tsk); |
222 | set_user_nice(tsk, KTHREAD_NICE_LEVEL); | ||
223 | set_cpus_allowed_ptr(tsk, cpu_all_mask); | 221 | set_cpus_allowed_ptr(tsk, cpu_all_mask); |
224 | set_mems_allowed(node_possible_map); | 222 | set_mems_allowed(node_possible_map); |
225 | 223 | ||