mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
[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>
This commit is contained in:
parent
52fdd08903
commit
2a23b5d1e1
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue