[CRIU] [PATCH 1/3] pstree: don't include restorer.h in pstree.h

Andrey Vagin avagin at openvz.org
Wed Nov 6 11:31:01 PST 2013


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 include/restorer.h | 8 +-------
 include/rst_info.h | 7 +++++++
 pstree.c           | 1 -
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/restorer.h b/include/restorer.h
index 3b83d81..8509da9 100644
--- a/include/restorer.h
+++ b/include/restorer.h
@@ -12,6 +12,7 @@
 #include "lock.h"
 #include "util.h"
 #include "asm/restorer.h"
+#include "rst_info.h"
 
 #include "posix-timer.h"
 #include "shmem.h"
@@ -169,13 +170,6 @@ enum {
 	CR_STATE_COMPLETE
 };
 
-struct task_entries {
-	int nr_threads, nr_tasks, nr_helpers;
-	futex_t nr_in_progress;
-	futex_t start;
-	mutex_t	zombie_lock;
-};
-
 #define restore_finish_stage(__stage) ({				\
 		futex_dec_and_wake(&task_entries->nr_in_progress);	\
 		futex_wait_while(&task_entries->start, __stage);	\
diff --git a/include/rst_info.h b/include/rst_info.h
index 38d7737..fa2c5a5 100644
--- a/include/rst_info.h
+++ b/include/rst_info.h
@@ -4,6 +4,13 @@
 #include "lock.h"
 #include "list.h"
 
+struct task_entries {
+	int nr_threads, nr_tasks, nr_helpers;
+	futex_t nr_in_progress;
+	futex_t start;
+	mutex_t	zombie_lock;
+};
+
 struct fdt {
 	int			nr;		/* How many tasks share this fd table */
 	pid_t			pid;		/* Who should restore this fd table */
diff --git a/pstree.c b/pstree.c
index 36ae0d1..b83453f 100644
--- a/pstree.c
+++ b/pstree.c
@@ -4,7 +4,6 @@
 
 #include "cr_options.h"
 #include "pstree.h"
-#include "restorer.h"
 #include "util.h"
 #include "lock.h"
 #include "namespaces.h"
-- 
1.8.3.1



More information about the CRIU mailing list