[CRIU] [PATCH 43/78] infect: Move thread_ctx structure into infect
Cyrill Gorcunov
gorcunov at openvz.org
Mon Nov 7 08:36:28 PST 2016
From: Pavel Emelyanov <xemul at virtuozzo.com>
For now it's becoming the part of the compel API and lets
us remove parasite-syscall.h from infect.c. The former header
includes declarations of CRIU dumping routines that work with
parasite code.
Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
criu/include/infect.h | 5 ++++-
criu/include/parasite-syscall.h | 5 -----
criu/infect-rpc.c | 1 -
criu/infect.c | 1 -
4 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/criu/include/infect.h b/criu/include/infect.h
index 6d4c5d392850..a161ae238139 100644
--- a/criu/include/infect.h
+++ b/criu/include/infect.h
@@ -31,7 +31,10 @@ extern int compel_unseize_task(pid_t pid, int orig_state, int state);
#define TASK_ZOMBIE 0x6
struct parasite_ctl;
-struct thread_ctx;
+struct thread_ctx {
+ k_rtsigset_t sigmask;
+ user_regs_struct_t regs;
+};
extern struct parasite_ctl *compel_prepare(int pid);
extern int compel_infect(struct parasite_ctl *ctl, unsigned long nr_threads, unsigned long args_size);
diff --git a/criu/include/parasite-syscall.h b/criu/include/parasite-syscall.h
index 5c4ca6de5a9b..30cb36b83871 100644
--- a/criu/include/parasite-syscall.h
+++ b/criu/include/parasite-syscall.h
@@ -22,11 +22,6 @@ struct pid;
struct parasite_dump_cgroup_args;
struct rt_sigframe;
-struct thread_ctx {
- k_rtsigset_t sigmask;
- user_regs_struct_t regs;
-};
-
struct parasite_ctl;
extern int parasite_dump_sigacts_seized(struct parasite_ctl *ctl, struct cr_imgset *cr_imgset);
diff --git a/criu/infect-rpc.c b/criu/infect-rpc.c
index 73d963def166..858a4c0b6ceb 100644
--- a/criu/infect-rpc.c
+++ b/criu/infect-rpc.c
@@ -1,6 +1,5 @@
#include "xmalloc.h"
#include "types.h"
-#include "parasite-syscall.h"
#include "log.h"
#include "common/bug.h"
#include "lock.h"
diff --git a/criu/infect.c b/criu/infect.c
index cf1cb3d4898f..a244f4874d1d 100644
--- a/criu/infect.c
+++ b/criu/infect.c
@@ -8,7 +8,6 @@
#include "infect.h"
#include "ptrace.h"
-#include "asm/parasite-syscall.h"
#include "restorer.h"
#include "parasite-syscall.h"
#include "pie-relocs.h"
--
2.7.4
More information about the CRIU
mailing list