diff --git a/cr-restore.c b/cr-restore.c index ff6543ace..133ac0a54 100644 --- a/cr-restore.c +++ b/cr-restore.c @@ -1153,7 +1153,7 @@ static int restore_root_task(struct pstree_item *init, struct cr_options *opts) if (ret < 0) goto out; - futex_set_and_wake(&task_entries->nr_in_progress, task_entries->nr); + futex_set_and_wake(&task_entries->nr_in_progress, task_entries->nr_threads); futex_set_and_wake(&task_entries->start, CR_STATE_RESTORE); pr_info("Wait until all tasks are restored\n"); @@ -1162,7 +1162,7 @@ static int restore_root_task(struct pstree_item *init, struct cr_options *opts) if (ret < 0) goto out; - futex_set_and_wake(&task_entries->nr_in_progress, task_entries->nr); + futex_set_and_wake(&task_entries->nr_in_progress, task_entries->nr_threads); futex_set_and_wake(&task_entries->start, CR_STATE_RESTORE_SIGCHLD); futex_wait_until(&task_entries->nr_in_progress, 0); @@ -1206,7 +1206,7 @@ static int prepare_task_entries() pr_perror("Can't map shmem"); return -1; } - task_entries->nr = 0; + task_entries->nr_threads = 0; task_entries->nr_tasks = 0; task_entries->nr_helpers = 0; futex_set(&task_entries->start, CR_STATE_FORKING); diff --git a/include/restorer.h b/include/restorer.h index 981db26bd..901183066 100644 --- a/include/restorer.h +++ b/include/restorer.h @@ -252,7 +252,7 @@ enum { }; struct task_entries { - int nr, nr_tasks, nr_helpers; + int nr_threads, nr_tasks, nr_helpers; futex_t nr_in_progress; futex_t start; }; diff --git a/pstree.c b/pstree.c index 95120ba78..7ec6c68ac 100644 --- a/pstree.c +++ b/pstree.c @@ -256,7 +256,7 @@ int prepare_pstree(void) for (i = 0; i < e->n_threads; i++) pi->threads[i].virt = e->threads[i]; - task_entries->nr += e->n_threads; + task_entries->nr_threads += e->n_threads; task_entries->nr_tasks++; pstree_entry__free_unpacked(e, NULL);