diff options
author | Pavel Machek <pavel@ucw.cz> | 2005-09-03 15:56:53 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 00:06:14 -0700 |
commit | 2a23b5d1e119fd10e25b8e93464c8d549f5a5c5d (patch) | |
tree | 60eede3a1a0a92837c0207de2750880d9a309db1 /kernel/power | |
parent | 52fdd08903a1d1162e184114837e232640191627 (diff) | |
download | kernel_samsung_aries-2a23b5d1e119fd10e25b8e93464c8d549f5a5c5d.zip kernel_samsung_aries-2a23b5d1e119fd10e25b8e93464c8d549f5a5c5d.tar.gz kernel_samsung_aries-2a23b5d1e119fd10e25b8e93464c8d549f5a5c5d.tar.bz2 |
[PATCH] remove busywait in refrigerator
This should make refrigerator sleep properly, not busywait after the first
schedule() returns.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/power')
-rw-r--r-- | kernel/power/process.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/power/process.c b/kernel/power/process.c index 3bd0d26..f7da5bf 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c @@ -38,7 +38,6 @@ void refrigerator(void) processes around? */ long save; save = current->state; - current->state = TASK_UNINTERRUPTIBLE; pr_debug("%s entered refrigerator\n", current->comm); printk("="); @@ -47,8 +46,10 @@ void refrigerator(void) recalc_sigpending(); /* We sent fake signal, clean it up */ spin_unlock_irq(¤t->sighand->siglock); - while (frozen(current)) + while (frozen(current)) { + current->state = TASK_UNINTERRUPTIBLE; schedule(); + } pr_debug("%s left refrigerator\n", current->comm); current->state = save; } |