[Patch 1/21] Reuse freezable() predicate

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Suzuki K. Poulose
Date: Tuesday, December 14, 2010 - 2:54 am

Export the freezable() predicate.

Signed-off-by: Suzuki K. Poulose <suzuki@in.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;
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] [Patch 0/21] Non disruptive application core dump in ..., Suzuki K. Poulose, (Tue Dec 14, 2:52 am)
[Patch 1/21] Reuse freezable() predicate, Suzuki K. Poulose, (Tue Dec 14, 2:54 am)
[Patch 2/21] Create elfcore-common.c for ELF class indepen ..., Suzuki K. Poulose, (Tue Dec 14, 2:57 am)
[Patch 3/21] Make vma_dump_size() generic, Suzuki K. Poulose, (Tue Dec 14, 3:00 am)
[Patch 4/21] Make fill_psinfo generic, Suzuki K. Poulose, (Tue Dec 14, 3:01 am)
[Patch 5/21] Rename compat versions of the reusable core g ..., Suzuki K. Poulose, (Tue Dec 14, 3:03 am)
[Patch 6/21] Export the reusable ELF core generation routines, Suzuki K. Poulose, (Tue Dec 14, 3:04 am)
[Patch 7/21] Define API for reading arch specif Program He ..., Suzuki K. Poulose, (Tue Dec 14, 3:05 am)
[Patch 8/21] ia64 Implementation of elf_core_copy_extra_ph ..., Suzuki K. Poulose, (Tue Dec 14, 3:08 am)
[Patch 9/21] UML (i386) Implementation of elf_core_copy_ex ..., Suzuki K. Poulose, (Tue Dec 14, 3:09 am)
[Patch 10/21] Create /proc/pid/core entry, Suzuki K. Poulose, (Tue Dec 14, 3:11 am)
[Patch 11/21] Track the core generation requests, Suzuki K. Poulose, (Tue Dec 14, 3:12 am)
[Patch 12/21] Check if the process is an ELF executable, Suzuki K. Poulose, (Tue Dec 14, 3:13 am)
[Patch 13/21] Freeze / Thaw threads, Suzuki K. Poulose, (Tue Dec 14, 3:15 am)
[Patch 14/21] Create ELF header, Suzuki K. Poulose, (Tue Dec 14, 3:16 am)
[Patch 15/21] Collect ELF Core notes data, Suzuki K. Poulose, (Tue Dec 14, 3:17 am)
[Patch 16/21] Wait for threads to freeze, Suzuki K. Poulose, (Tue Dec 14, 3:19 am)
[Patch 17/21] Calculate the size of the core file, Suzuki K. Poulose, (Tue Dec 14, 3:20 am)
[Patch 18/21] Generate the data sections for ELF Core, Suzuki K. Poulose, (Tue Dec 14, 3:22 am)
[Patch 19/21] Identify the ELF class of the process, Suzuki K. Poulose, (Tue Dec 14, 3:24 am)
[Patch 20/21] Add supporting for compat ELF class data str ..., Suzuki K. Poulose, (Tue Dec 14, 3:26 am)
[Patch 21/21] Compat ELF class Core generation support, Suzuki K. Poulose, (Tue Dec 14, 3:27 am)
Re: [Patch 10/21] Create /proc/pid/core entry, Cong Wang, (Tue Dec 14, 3:36 am)
Re: [Patch 11/21] Track the core generation requests, Alexey Dobriyan, (Tue Dec 14, 3:51 am)
Re: [RFC] [Patch 0/21] Non disruptive application core dum ..., Suzuki K. Poulose, (Tue Dec 14, 7:59 am)
Re: [Patch 10/21] Create /proc/pid/core entry, Suzuki K. Poulose, (Tue Dec 14, 8:02 am)
Re: [Patch 3/21] Make vma_dump_size() generic, Oleg Nesterov, (Tue Dec 14, 8:53 am)
Re: [Patch 4/21] Make fill_psinfo generic, Oleg Nesterov, (Tue Dec 14, 8:53 am)
Re: [Patch 4/21] Make fill_psinfo generic, Linus Torvalds, (Tue Dec 14, 8:55 am)
Re: [Patch 11/21] Track the core generation requests, Oleg Nesterov, (Tue Dec 14, 9:04 am)
Re: [Patch 13/21] Freeze / Thaw threads, Oleg Nesterov, (Tue Dec 14, 9:17 am)
Re: [Patch 14/21] Create ELF header, Oleg Nesterov, (Tue Dec 14, 9:24 am)
Re: [Patch 15/21] Collect ELF Core notes data, Oleg Nesterov, (Tue Dec 14, 9:37 am)
Re: [Patch 16/21] Wait for threads to freeze, Oleg Nesterov, (Tue Dec 14, 9:42 am)
Re: [RFC] [Patch 0/21] Non disruptive application core dum ..., KAMEZAWA Hiroyuki, (Tue Dec 14, 6:04 pm)
Re: [Patch 4/21] Make fill_psinfo generic, Suzuki K. Poulose, (Tue Dec 14, 7:22 pm)
Re: [Patch 5/21] Rename compat versions of the reusable co ..., Suzuki K. Poulose, (Tue Dec 14, 7:30 pm)
Re: [RFC] [Patch 0/21] Non disruptive application core dum ..., Suzuki K. Poulose, (Tue Dec 14, 10:24 pm)
Re: [RFC] [Patch 0/21] Non disruptive application core dum ..., Suzuki K. Poulose, (Tue Dec 14, 10:34 pm)
Re: [RFC] [Patch 0/21] Non disruptive application core dum ..., Suzuki K. Poulose, (Wed Dec 15, 4:26 am)
Re: [Patch 18/21] Generate the data sections for ELF Core, Suzuki K. Poulose, (Wed Dec 15, 5:46 am)
Re: [RFC] [Patch 0/21] Non disruptive application core dum ..., Suzuki K. Poulose, (Thu Dec 16, 12:57 am)