[CRIU] [PATCH 4/8] compel: Hide parasite_thread_ctl

Pavel Emelyanov xemul at virtuozzo.com
Mon Nov 14 05:05:36 PST 2016


Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
 compel/include/infect-priv.h | 9 +++++++++
 compel/include/uapi/infect.h | 9 +--------
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/compel/include/infect-priv.h b/compel/include/infect-priv.h
index 2ba85cf..da56f08 100644
--- a/compel/include/infect-priv.h
+++ b/compel/include/infect-priv.h
@@ -5,6 +5,11 @@
 
 #define BUILTIN_SYSCALL_SIZE	8
 
+struct thread_ctx {
+	k_rtsigset_t		sigmask;
+	user_regs_struct_t	regs;
+};
+
 /* parasite control block */
 struct parasite_ctl {
 	int			rpid;					/* Real pid of the victim */
@@ -36,6 +41,10 @@ struct parasite_ctl {
 	struct parasite_blob_desc pblob;
 };
 
+struct parasite_thread_ctl {
+	struct thread_ctx	th;
+};
+
 #define MEMFD_FNAME	"CRIUMFD"
 #define MEMFD_FNAME_SZ	sizeof(MEMFD_FNAME)
 
diff --git a/compel/include/uapi/infect.h b/compel/include/uapi/infect.h
index f0520ff..28f0c46 100644
--- a/compel/include/uapi/infect.h
+++ b/compel/include/uapi/infect.h
@@ -37,14 +37,7 @@ extern int compel_unseize_task(pid_t pid, int orig_state, int state);
 #define TASK_ZOMBIE		0x6
 
 struct parasite_ctl;
-struct thread_ctx {
-	k_rtsigset_t		sigmask;
-	user_regs_struct_t	regs;
-};
-
-struct parasite_thread_ctl {
-	struct thread_ctx	th;
-};
+struct parasite_thread_ctl;
 
 extern struct parasite_ctl *compel_prepare(int pid);
 extern int compel_infect(struct parasite_ctl *ctl, unsigned long nr_threads, unsigned long args_size);
-- 
2.5.0



More information about the CRIU mailing list