diff --git a/executer/include/uprotocol.h b/executer/include/uprotocol.h index 9e80a80c..c3fbe6b4 100644 --- a/executer/include/uprotocol.h +++ b/executer/include/uprotocol.h @@ -129,6 +129,7 @@ struct program_load_desc { unsigned long interp_align; unsigned long mpol_flags; unsigned long mpol_threshold; + int nr_processes; char shell_path[SHELL_PATH_MAX_LEN]; __cpu_set_unit cpu_set[PLD_CPU_SET_SIZE]; struct program_image_section sections[0]; diff --git a/executer/user/mcexec.c b/executer/user/mcexec.c index 99bd5503..f454e6da 100644 --- a/executer/user/mcexec.c +++ b/executer/user/mcexec.c @@ -1738,6 +1738,7 @@ int main(int argc, char **argv) } } + desc->nr_processes = nr_processes; desc->mpol_flags = 0; if (mpol_no_heap) { desc->mpol_flags |= MPOL_NO_HEAP; diff --git a/kernel/host.c b/kernel/host.c index 67341467..7663627f 100644 --- a/kernel/host.c +++ b/kernel/host.c @@ -430,6 +430,7 @@ static int process_msg_prepare_process(unsigned long rphys) proc->termsig = SIGCHLD; proc->mpol_flags = pn->mpol_flags; proc->mpol_threshold = pn->mpol_threshold; + proc->nr_processes = pn->nr_processes; vm->region.user_start = pn->user_start; vm->region.user_end = pn->user_end; diff --git a/kernel/include/process.h b/kernel/include/process.h index c4a47b68..5dc44596 100644 --- a/kernel/include/process.h +++ b/kernel/include/process.h @@ -549,6 +549,7 @@ struct process { mcs_lock_node_t profile_lock; struct profile_event *profile_events; #endif // PROFILE_ENABLE + int nr_processes; /* For partitioned execution */ }; void hold_thread(struct thread *ftn); diff --git a/kernel/include/syscall.h b/kernel/include/syscall.h index 91edbc49..b8f1d53f 100644 --- a/kernel/include/syscall.h +++ b/kernel/include/syscall.h @@ -194,6 +194,7 @@ struct program_load_desc { unsigned long interp_align; unsigned long mpol_flags; unsigned long mpol_threshold; + int nr_processes; char shell_path[SHELL_PATH_MAX_LEN]; __cpu_set_unit cpu_set[PLD_CPU_SET_SIZE]; struct program_image_section sections[0];