mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
compel: Introduce compel_thread_sigmask
The plan is to rectify the thread infection API and hide thread_ctx from uapi eventually, so here's the symmetrical to compel_task_sigmask() call for threads. Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
64bb75a859
commit
80e2500cf9
@@ -92,6 +92,7 @@ extern int compel_unmap(struct parasite_ctl *ctl, unsigned long addr);
|
||||
extern int compel_mode_native(struct parasite_ctl *ctl);
|
||||
|
||||
extern k_rtsigset_t *compel_task_sigmask(struct parasite_ctl *ctl);
|
||||
extern k_rtsigset_t *compel_thread_sigmask(struct thread_ctx *tctx);
|
||||
|
||||
struct rt_sigframe;
|
||||
|
||||
|
@@ -1255,9 +1255,14 @@ int compel_mode_native(struct parasite_ctl *ctl)
|
||||
return user_regs_native(&ctl->orig.regs);
|
||||
}
|
||||
|
||||
k_rtsigset_t *compel_thread_sigmask(struct thread_ctx *tctx)
|
||||
{
|
||||
return &tctx->sigmask;
|
||||
}
|
||||
|
||||
k_rtsigset_t *compel_task_sigmask(struct parasite_ctl *ctl)
|
||||
{
|
||||
return &ctl->orig.sigmask;
|
||||
return compel_thread_sigmask(&ctl->orig);
|
||||
}
|
||||
|
||||
struct infect_ctx *compel_infect_ctx(struct parasite_ctl *ctl)
|
||||
|
@@ -201,7 +201,7 @@ int parasite_dump_thread_seized(struct parasite_ctl *ctl, int id,
|
||||
return -1;
|
||||
|
||||
tc->has_blk_sigset = true;
|
||||
memcpy(&tc->blk_sigset, &octx.sigmask, sizeof(k_rtsigset_t));
|
||||
memcpy(&tc->blk_sigset, compel_thread_sigmask(&octx), sizeof(k_rtsigset_t));
|
||||
|
||||
ret = compel_run_in_thread(pid, PARASITE_CMD_DUMP_THREAD, ctl, &octx);
|
||||
if (ret) {
|
||||
|
Reference in New Issue
Block a user