lkml.org 
[lkml]   [2006]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[Suspend2][ 13/20] [Suspend2] Try to refreeze processes.
Date
Try to refreeze processes after thawing kernel threads to eat memory. This
shouldn't fail, but if it does, we ensure it's handled nicely.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

kernel/power/prepare_image.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/kernel/power/prepare_image.c b/kernel/power/prepare_image.c
index 6b3f2c9..4e012a7 100644
--- a/kernel/power/prepare_image.c
+++ b/kernel/power/prepare_image.c
@@ -394,3 +394,11 @@ void suspend_recalculate_image_contents(
return;
}

+static void try_freeze_processes(void)
+{
+ if (freeze_processes()) {
+ set_result_state(SUSPEND_FREEZING_FAILED);
+ set_result_state(SUSPEND_ABORTED);
+ }
+}
+
--
Nigel Cunningham nigel at suspend2 dot net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-27 01:28    [W:0.126 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site