2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

restore: Bring trivial locker back

Threads are better to be restored in serialized
way otherwise if some error happened an error
message will be screwed.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov
2011-11-17 00:59:08 +04:00
parent a095617253
commit 01f8f8f4d1
3 changed files with 35 additions and 1 deletions

View File

@@ -1453,6 +1453,7 @@ static void sigreturn_restore(pid_t pstree_pid, pid_t pid)
task_args->pid = pid;
task_args->fd_core = fd_core;
task_args->fd_self_vmas = fd_self_vmas;
task_args->rst_lock = 0;
if (pstree_entry.nr_threads) {
int i;
@@ -1479,6 +1480,8 @@ static void sigreturn_restore(pid_t pstree_pid, pid_t pid)
goto err;
}
thread_args[i].rst_lock = &task_args->rst_lock;
pr_info("Thread %4d stack %8p heap %8p rt_sigframe %8p\n",
i, (long)thread_args[i].mem_zone.stack,
thread_args[i].mem_zone.heap,