diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2006-08-05 15:13:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-08-06 11:57:45 -0400 |
commit | a7ef7878ea7c8bca9b624db3f61223cdadda2a0a (patch) | |
tree | 3727435826f2fe3d054f0f3fbc3e60f2b37d8bad /include/linux | |
parent | f5d635f649607b09b0b4620d25d028fd2b1b7ea5 (diff) |
[PATCH] Make suspend possible with a traced process at a breakpoint
It should be possible to suspend, either to RAM or to disk, if there's a
traced process that has just reached a breakpoint. However, this is a
special case, because its parent process might have been frozen already and
then we are unable to deliver the "freeze" signal to the traced process.
If this happens, it's better to cancel the freezing of the traced process.
Ref. http://bugzilla.kernel.org/show_bug.cgi?id=6787
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/sched.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 6afa72e080cb..6674fc1e51bf 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1558,6 +1558,14 @@ static inline void freeze(struct task_struct *p) | |||
1558 | } | 1558 | } |
1559 | 1559 | ||
1560 | /* | 1560 | /* |
1561 | * Sometimes we may need to cancel the previous 'freeze' request | ||
1562 | */ | ||
1563 | static inline void do_not_freeze(struct task_struct *p) | ||
1564 | { | ||
1565 | p->flags &= ~PF_FREEZE; | ||
1566 | } | ||
1567 | |||
1568 | /* | ||
1561 | * Wake up a frozen process | 1569 | * Wake up a frozen process |
1562 | */ | 1570 | */ |
1563 | static inline int thaw_process(struct task_struct *p) | 1571 | static inline int thaw_process(struct task_struct *p) |