Commit e0d0dc82 authored by Pavel Emelyanov's avatar Pavel Emelyanov

rst: Rename task_entries->nr to ->nr_threads

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 2482c5a2
...@@ -1153,7 +1153,7 @@ static int restore_root_task(struct pstree_item *init, struct cr_options *opts) ...@@ -1153,7 +1153,7 @@ static int restore_root_task(struct pstree_item *init, struct cr_options *opts)
if (ret < 0) if (ret < 0)
goto out; 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); futex_set_and_wake(&task_entries->start, CR_STATE_RESTORE);
pr_info("Wait until all tasks are restored\n"); 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) ...@@ -1162,7 +1162,7 @@ static int restore_root_task(struct pstree_item *init, struct cr_options *opts)
if (ret < 0) if (ret < 0)
goto out; 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_set_and_wake(&task_entries->start, CR_STATE_RESTORE_SIGCHLD);
futex_wait_until(&task_entries->nr_in_progress, 0); futex_wait_until(&task_entries->nr_in_progress, 0);
...@@ -1206,7 +1206,7 @@ static int prepare_task_entries() ...@@ -1206,7 +1206,7 @@ static int prepare_task_entries()
pr_perror("Can't map shmem"); pr_perror("Can't map shmem");
return -1; return -1;
} }
task_entries->nr = 0; task_entries->nr_threads = 0;
task_entries->nr_tasks = 0; task_entries->nr_tasks = 0;
task_entries->nr_helpers = 0; task_entries->nr_helpers = 0;
futex_set(&task_entries->start, CR_STATE_FORKING); futex_set(&task_entries->start, CR_STATE_FORKING);
......
...@@ -252,7 +252,7 @@ enum { ...@@ -252,7 +252,7 @@ enum {
}; };
struct task_entries { struct task_entries {
int nr, nr_tasks, nr_helpers; int nr_threads, nr_tasks, nr_helpers;
futex_t nr_in_progress; futex_t nr_in_progress;
futex_t start; futex_t start;
}; };
......
...@@ -256,7 +256,7 @@ int prepare_pstree(void) ...@@ -256,7 +256,7 @@ int prepare_pstree(void)
for (i = 0; i < e->n_threads; i++) for (i = 0; i < e->n_threads; i++)
pi->threads[i].virt = e->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++; task_entries->nr_tasks++;
pstree_entry__free_unpacked(e, NULL); pstree_entry__free_unpacked(e, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment