[CRIU] [PATCH 06/10] image.h: Move TASK_FOO states into pid.h

Pavel Emelyanov xemul at virtuozzo.com
Fri May 20 09:54:00 PDT 2016


Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
 criu/files-reg.c     | 1 -
 criu/include/image.h | 7 -------
 criu/include/pid.h   | 7 +++++++
 criu/ptrace.c        | 1 +
 criu/tty.c           | 1 -
 5 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/criu/files-reg.c b/criu/files-reg.c
index f485e3f..ddae5ce 100644
--- a/criu/files-reg.c
+++ b/criu/files-reg.c
@@ -20,7 +20,6 @@
 #include "file-ids.h"
 #include "mount.h"
 #include "files.h"
-#include "image.h"
 #include "list.h"
 #include "rst-malloc.h"
 #include "fs-magic.h"
diff --git a/criu/include/image.h b/criu/include/image.h
index 51f90f1..9981f08 100644
--- a/criu/include/image.h
+++ b/criu/include/image.h
@@ -94,13 +94,6 @@
 
 #define TASK_COMM_LEN 16
 
-#define TASK_UNDEF		0x0
-#define TASK_ALIVE		0x1
-#define TASK_DEAD		0x2
-#define TASK_STOPPED		0x3
-#define TASK_HELPER		0x4
-#define TASK_THREAD		0x5
-
 #define CR_PARENT_LINK "parent"
 
 extern bool fdinfo_per_id;
diff --git a/criu/include/pid.h b/criu/include/pid.h
index 533be88..bf978b4 100644
--- a/criu/include/pid.h
+++ b/criu/include/pid.h
@@ -24,6 +24,13 @@ struct pid {
 	struct rb_node node;
 };
 
+#define TASK_UNDEF		0x0
+#define TASK_ALIVE		0x1
+#define TASK_DEAD		0x2
+#define TASK_STOPPED		0x3
+#define TASK_HELPER		0x4
+#define TASK_THREAD		0x5
+
 /*
  * When we have to restore a shared resource, we mush select which
  * task should do it, and make other(s) wait for it. In order to
diff --git a/criu/ptrace.c b/criu/ptrace.c
index 25970fc..16c0b5b 100644
--- a/criu/ptrace.c
+++ b/criu/ptrace.c
@@ -18,6 +18,7 @@
 #include "asm/types.h"
 #include "util.h"
 #include "ptrace.h"
+#include "pid.h"
 #include "proc_parse.h"
 #include "crtools.h"
 #include "seccomp.h"
diff --git a/criu/tty.c b/criu/tty.c
index 5c72fcc..d47266f 100644
--- a/criu/tty.c
+++ b/criu/tty.c
@@ -20,7 +20,6 @@
 #include "cr_options.h"
 #include "imgset.h"
 #include "servicefd.h"
-#include "image.h"
 #include "rst-malloc.h"
 #include "log.h"
 #include "list.h"
-- 
2.5.0



More information about the CRIU mailing list