[CRIU] [PATCH 07/15] crtools: don't include pstree.h in parasite-syscall.h
Andrey Vagin
avagin at openvz.org
Mon Nov 4 22:00:29 PST 2013
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
include/parasite-syscall.h | 5 +++--
include/pstree.h | 17 +----------------
include/types.h | 19 +++++++++++++++++++
3 files changed, 23 insertions(+), 18 deletions(-)
create mode 100644 include/types.h
diff --git a/include/parasite-syscall.h b/include/parasite-syscall.h
index fc2d755..a31e51d 100644
--- a/include/parasite-syscall.h
+++ b/include/parasite-syscall.h
@@ -1,9 +1,10 @@
#ifndef __CR_PARASITE_SYSCALL_H__
#define __CR_PARASITE_SYSCALL_H__
-#define BUILTIN_SYSCALL_SIZE 8
+#include "types.h"
+#include "list.h"
-#include "pstree.h"
+#define BUILTIN_SYSCALL_SIZE 8
struct parasite_dump_thread;
struct parasite_dump_misc;
diff --git a/include/pstree.h b/include/pstree.h
index 20bacb7..b80d5b1 100644
--- a/include/pstree.h
+++ b/include/pstree.h
@@ -2,6 +2,7 @@
#define __CR_PSTREE_H__
#include "list.h"
+#include "types.h"
#include "crtools.h"
#include "protobuf/core.pb-c.h"
@@ -11,22 +12,6 @@
*/
#define INIT_PID (1)
-struct pid {
- /*
- * The @real pid is used to fetch tasks during dumping stage,
- * This is a global pid seen from the context where the dumping
- * is running.
- */
- pid_t real;
-
- /*
- * The @virt pid is one which used in the image itself and keeps
- * the pid value to be restored. This pid fetched from the
- * dumpee context, because the dumpee might have own pid namespace.
- */
- pid_t virt;
-};
-
struct pstree_item {
struct pstree_item *parent;
struct list_head children; /* list of my children */
diff --git a/include/types.h b/include/types.h
new file mode 100644
index 0000000..5ea5cef
--- /dev/null
+++ b/include/types.h
@@ -0,0 +1,19 @@
+#ifndef __CR_TYPES_H__
+#define __CR_TYPES_H__
+struct pid {
+ /*
+ * The @real pid is used to fetch tasks during dumping stage,
+ * This is a global pid seen from the context where the dumping
+ * is running.
+ */
+ pid_t real;
+
+ /*
+ * The @virt pid is one which used in the image itself and keeps
+ * the pid value to be restored. This pid fetched from the
+ * dumpee context, because the dumpee might have own pid namespace.
+ */
+ pid_t virt;
+};
+
+#endif
--
1.8.3.1
More information about the CRIU
mailing list