projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
workqueue: debug flushing deadlocks with lockdep
[powerpc.git]
/
kernel
/
kthread.c
diff --git
a/kernel/kthread.c
b/kernel/kthread.c
index
df8a8e8
..
dcfe724
100644
(file)
--- a/
kernel/kthread.c
+++ b/
kernel/kthread.c
@@
-70,7
+70,7
@@
static int kthread(void *_create)
data = create->data;
/* OK, tell user we're spawned, wait for stop or wakeup */
data = create->data;
/* OK, tell user we're spawned, wait for stop or wakeup */
- __set_current_state(TASK_INTERRUPTIBLE);
+ __set_current_state(TASK_
UN
INTERRUPTIBLE);
complete(&create->started);
schedule();
complete(&create->started);
schedule();
@@
-162,7
+162,10
@@
EXPORT_SYMBOL(kthread_create);
*/
void kthread_bind(struct task_struct *k, unsigned int cpu)
{
*/
void kthread_bind(struct task_struct *k, unsigned int cpu)
{
- BUG_ON(k->state != TASK_INTERRUPTIBLE);
+ if (k->state != TASK_UNINTERRUPTIBLE) {
+ WARN_ON(1);
+ return;
+ }
/* Must have done schedule() in kthread() before we set_task_cpu */
wait_task_inactive(k);
set_task_cpu(k, cpu);
/* Must have done schedule() in kthread() before we set_task_cpu */
wait_task_inactive(k);
set_task_cpu(k, cpu);
@@
-211,23
+214,15
@@
int kthread_stop(struct task_struct *k)
}
EXPORT_SYMBOL(kthread_stop);
}
EXPORT_SYMBOL(kthread_stop);
-
-static __init void kthreadd_setup(void)
+int kthreadd(void *unused)
{
struct task_struct *tsk = current;
{
struct task_struct *tsk = current;
+ /* Setup a clean context for our children to inherit. */
set_task_comm(tsk, "kthreadd");
set_task_comm(tsk, "kthreadd");
-
ignore_signals(tsk);
ignore_signals(tsk);
-
set_user_nice(tsk, -5);
set_cpus_allowed(tsk, CPU_MASK_ALL);
set_user_nice(tsk, -5);
set_cpus_allowed(tsk, CPU_MASK_ALL);
-}
-
-int kthreadd(void *unused)
-{
- /* Setup a clean context for our children to inherit. */
- kthreadd_setup();
current->flags |= PF_NOFREEZE;
current->flags |= PF_NOFREEZE;