Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56865
b: refs/heads/master
c: a076e4b
h: refs/heads/master
i:
  56863: 7ac0d8f
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed May 24, 2007
1 parent ab969ae commit 7950186
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 49b12d4f5e274517b8bc032d507abf31cc2f4150
refs/heads/master: a076e4bca2fdabb9e45d86722cc72c0944da5f94
7 changes: 5 additions & 2 deletions trunk/kernel/kthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static int kthread(void *_create)
data = create->data;

/* OK, tell user we're spawned, wait for stop or wakeup */
__set_current_state(TASK_INTERRUPTIBLE);
__set_current_state(TASK_UNINTERRUPTIBLE);
complete(&create->started);
schedule();

Expand Down Expand Up @@ -162,7 +162,10 @@ EXPORT_SYMBOL(kthread_create);
*/
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);
Expand Down

0 comments on commit 7950186

Please sign in to comment.