From: Nigel Cunningham <nigel@suspend2.net>
To: linux-kernel@vger.kernel.org
Subject: [Suspend2][ 12/13] [Suspend2] Suspend2 common header.
Date: Tue, 27 Jun 2006 14:43:07 +1000 [thread overview]
Message-ID: <20060627044305.15066.1229.stgit@nigel.suspend2.net> (raw)
In-Reply-To: <20060627044226.15066.7403.stgit@nigel.suspend2.net>
Declarations used by virtually all of the Suspend2 files, but which are not
needed externally. That is, debugging and result set/clear macros and the
enum for the result codes.
Signed-off-by: Nigel Cunningham <nigel@suspend2.net>
kernel/power/suspend2_common.h | 45 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/kernel/power/suspend2_common.h b/kernel/power/suspend2_common.h
new file mode 100644
index 0000000..455250e
--- /dev/null
+++ b/kernel/power/suspend2_common.h
@@ -0,0 +1,45 @@
+/*
+ * kernel/power/suspend2_common.h
+ *
+ * Copyright (C) 2005-2006 Nigel Cunningham <nigel@suspend2.net>
+ *
+ * This file is released under the GPLv2.
+ *
+ * Routines for talking to a userspace program that manages storage.
+ *
+ * The kernel side:
+ * - starts the userspace program;
+ * - sends messages telling it when to open and close the connection;
+ * - tells it when to quit;
+ *
+ * The user space side:
+ * - passes messages regarding status;
+ *
+ */
+
+#ifdef CONFIG_PM_DEBUG
+#define set_debug_state(bit) (test_and_set_bit(bit, &suspend_debug_state))
+#define clear_debug_state(bit) (test_and_clear_bit(bit, &suspend_debug_state))
+#else
+#define set_debug_state(bit) (0)
+#define clear_debug_state(bit) (0)
+#endif
+
+#define set_result_state(bit) (test_and_set_bit(bit, &suspend_result))
+#define clear_result_state(bit) (test_and_clear_bit(bit, &suspend_result))
+
+enum {
+ SUSPEND_ABORT_REQUESTED = 1,
+ SUSPEND_NOSTORAGE_AVAILABLE,
+ SUSPEND_INSUFFICIENT_STORAGE,
+ SUSPEND_FREEZING_FAILED,
+ SUSPEND_UNEXPECTED_ALLOC,
+ SUSPEND_KEPT_IMAGE,
+ SUSPEND_WOULD_EAT_MEMORY,
+ SUSPEND_UNABLE_TO_FREE_ENOUGH_MEMORY,
+ SUSPEND_ENCRYPTION_SETUP_FAILED,
+ SUSPEND_PM_SEM,
+};
+
+extern unsigned int nr_suspends;
+extern char resume2_file[256];
--
Nigel Cunningham nigel at suspend2 dot net
next prev parent reply other threads:[~2006-06-27 4:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-27 4:42 [Suspend2][ 00/13] Miscellaneous patches Nigel Cunningham
2006-06-27 4:42 ` [Suspend2][ 01/13] [Suspend2] Suspend2 version header Nigel Cunningham
2006-06-27 4:42 ` [Suspend2][ 02/13] [Suspend2] Boot time hooks Nigel Cunningham
2006-06-27 4:42 ` [Suspend2][ 03/13] [Suspend2] Add netlink socket numbers Nigel Cunningham
2006-06-27 4:42 ` [Suspend2][ 04/13] [Suspend2] Follow page routine Nigel Cunningham
2006-06-27 4:42 ` [Suspend2][ 05/13] [Suspend2] LRU paranoia patch Nigel Cunningham
2006-06-27 4:42 ` [Suspend2][ 06/13] [Suspend2] Remove __nosave declarations in power.h Nigel Cunningham
2006-06-27 4:42 ` [Suspend2][ 07/13] [Suspend2] Page_alloc paranoia Nigel Cunningham
2006-06-27 6:11 ` Nick Piggin
2006-06-27 6:34 ` Nigel Cunningham
2006-06-29 16:22 ` Nick Piggin
2006-06-29 22:15 ` Nigel Cunningham
2006-07-04 10:54 ` Nigel Cunningham
2006-07-04 16:53 ` Nick Piggin
2006-06-27 6:33 ` Paul Jackson
2006-06-27 7:01 ` Nigel Cunningham
2006-06-27 4:42 ` [Suspend2][ 08/13] [Suspend2] Powerpc support (needed?) Nigel Cunningham
2006-06-27 4:42 ` [Suspend2][ 09/13] [Suspend2] Reset kswapd_max_order after resume Nigel Cunningham
2006-06-27 4:43 ` [Suspend2][ 10/13] [Suspend2] Replace swsusp reboot hook Nigel Cunningham
2006-06-27 4:43 ` [Suspend2][ 11/13] [Suspend2] snprintf_used function Nigel Cunningham
2006-06-27 4:43 ` Nigel Cunningham [this message]
2006-06-27 4:43 ` [Suspend2][ 13/13] [Suspend2] Suspend2 include file Nigel Cunningham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060627044305.15066.1229.stgit@nigel.suspend2.net \
--to=nigel@suspend2.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome