[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101214152459.581ec3f0@suzukikp>
Date: Tue, 14 Dec 2010 15:24:59 +0530
From: "Suzuki K. Poulose" <suzuki@...ibm.com>
To: "Suzuki K. Poulose" <suzuki@...ibm.com>
Cc: linux-kernel@...r.kernel.org,
Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>,
Christoph Hellwig <hch@....de>,
Masami Hiramatsu <mhiramat@...hat.com>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Daisuke HATAYAMA <d.hatayama@...fujitsu.com>,
Andi Kleen <andi@...stfloor.org>,
Roland McGrath <roland@...hat.com>,
Amerigo Wang <amwang@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Oleg Nesterov <oleg@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [Patch 1/21] Reuse freezable() predicate
Export the freezable() predicate.
Signed-off-by: Suzuki K. Poulose <suzuki@...ibm.com>
---
include/linux/freezer.h | 12 ++++++++++++
kernel/power/process.c | 9 ---------
2 files changed, 12 insertions(+), 9 deletions(-)
Index: linux-2.6.36-rc7/include/linux/freezer.h
===================================================================
--- linux-2.6.36-rc7.orig/include/linux/freezer.h
+++ linux-2.6.36-rc7/include/linux/freezer.h
@@ -8,6 +8,18 @@
#ifdef CONFIG_FREEZER
/*
+ * Check if the task is freezeable ?
+ */
+static inline int freezeable(struct task_struct * p)
+{
+ if ((p == current) ||
+ (p->flags & PF_NOFREEZE) ||
+ (p->exit_state != 0))
+ return 0;
+ return 1;
+}
+
+/*
* Check if a process has been frozen
*/
static inline int frozen(struct task_struct *p)
Index: linux-2.6.36-rc7/kernel/power/process.c
===================================================================
--- linux-2.6.36-rc7.orig/kernel/power/process.c
+++ linux-2.6.36-rc7/kernel/power/process.c
@@ -22,15 +22,6 @@
*/
#define TIMEOUT (20 * HZ)
-static inline int freezeable(struct task_struct * p)
-{
- if ((p == current) ||
- (p->flags & PF_NOFREEZE) ||
- (p->exit_state != 0))
- return 0;
- return 1;
-}
-
static int try_to_freeze_tasks(bool sig_only)
{
struct task_struct *g, *p;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists