rst: Rename task_entries->nr to ->nr_threads

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov 2012-12-04 17:22:45 +03:00
parent 2482c5a24b
commit e0d0dc821d
3 changed files with 5 additions and 5 deletions

View file

@ -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);

View file

@ -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;
};

View file

@ -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);