Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44461
b: refs/heads/master
c: 3df494a
h: refs/heads/master
i:
  44459: 9c24400
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Linus Torvalds committed Dec 13, 2006
1 parent 274d40d commit c9dfe0d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 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: 6a2d7a955d8de6cb19ed9cd194b3c83008a22c32
refs/heads/master: 3df494a32b936aef76d893f5065f962ebd9b9437
12 changes: 6 additions & 6 deletions trunk/kernel/power/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ static inline int freezeable(struct task_struct * p)
if ((p == current) ||
(p->flags & PF_NOFREEZE) ||
(p->exit_state == EXIT_ZOMBIE) ||
(p->exit_state == EXIT_DEAD) ||
(p->state == TASK_STOPPED))
(p->exit_state == EXIT_DEAD))
return 0;
return 1;
}
Expand Down Expand Up @@ -61,9 +60,12 @@ static inline void freeze_process(struct task_struct *p)
unsigned long flags;

if (!freezing(p)) {
if (p->state == TASK_STOPPED)
force_sig_specific(SIGSTOP, p);

freeze(p);
spin_lock_irqsave(&p->sighand->siglock, flags);
signal_wake_up(p, 0);
signal_wake_up(p, p->state == TASK_STOPPED);
spin_unlock_irqrestore(&p->sighand->siglock, flags);
}
}
Expand Down Expand Up @@ -103,9 +105,7 @@ static unsigned int try_to_freeze_tasks(int freeze_user_space)
if (frozen(p))
continue;

if (p->state == TASK_TRACED &&
(frozen(p->parent) ||
p->parent->state == TASK_STOPPED)) {
if (p->state == TASK_TRACED && frozen(p->parent)) {
cancel_freezing(p);
continue;
}
Expand Down
4 changes: 3 additions & 1 deletion trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,9 @@ finish_stop(int stop_count)
read_unlock(&tasklist_lock);
}

schedule();
do {
schedule();
} while (try_to_freeze());
/*
* Now we don't run again until continued.
*/
Expand Down

0 comments on commit c9dfe0d

Please sign in to comment.