parasite: Relax the parasite_execute_trap_by_pid API

Submitted by Pavel Emelianov on Oct. 17, 2016, 12:05 p.m.

Details

Message ID 5804BE91.4070804@virtuozzo.com
State Accepted
Series "parasite: Relax the parasite_execute_trap_by_pid API"
Commit 0516a460ef6ddd75c9b318f7fbfebda0f7b0a776
Headers show

Commit Message

Pavel Emelianov Oct. 17, 2016, 12:05 p.m.
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>

---
 criu/parasite-syscall.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/parasite-syscall.c b/criu/parasite-syscall.c
index cf7c5bc..2fbbab6 100644
--- a/criu/parasite-syscall.c
+++ b/criu/parasite-syscall.c
@@ -248,11 +248,11 @@  void *parasite_args_s(struct parasite_ctl *ctl, int args_size)
 	return ctl->addr_args;
 }
 
-static int parasite_execute_trap_by_pid(unsigned int cmd,
-					struct parasite_ctl *ctl, pid_t pid,
-					void *stack,
+static int parasite_run_in_thread(pid_t pid, unsigned int cmd,
+					struct parasite_ctl *ctl,
 					struct thread_ctx *octx)
 {
+	void *stack = ctl->r_thread_stack;
 	user_regs_struct_t regs = octx->regs;
 	int ret;
 
@@ -654,8 +654,7 @@  int parasite_dump_thread_seized(struct parasite_ctl *ctl, int id,
 	tc->has_blk_sigset = true;
 	memcpy(&tc->blk_sigset, &octx.sigmask, sizeof(k_rtsigset_t));
 
-	ret = parasite_execute_trap_by_pid(PARASITE_CMD_DUMP_THREAD, ctl,
-			pid, ctl->r_thread_stack, &octx);
+	ret = parasite_run_in_thread(pid, PARASITE_CMD_DUMP_THREAD, ctl, &octx);
 	if (ret) {
 		pr_err("Can't init thread in parasite %d\n", pid);
 		return -1;