1.1 --- a/libexec/lib/src/process.cc Mon Mar 06 16:19:15 2023 +0100
1.2 +++ b/libexec/lib/src/process.cc Mon Mar 06 18:30:22 2023 +0100
1.3 @@ -109,7 +109,7 @@
1.4
1.5 /* Configure the task environment. */
1.6
1.7 -long Process::configure_task(l4_cap_idx_t *task, l4_cap_idx_t *rtask, unsigned int threads)
1.8 +long Process::configure_task(l4_cap_idx_t *task, l4_cap_idx_t *mapped_task, unsigned int threads)
1.9 {
1.10 long err = create_task(threads);
1.11
1.12 @@ -141,37 +141,37 @@
1.13 /* Return the capability details for the task. */
1.14
1.15 *task = _task;
1.16 - *rtask = L4_BASE_TASK_CAP;
1.17 + *mapped_task = L4_BASE_TASK_CAP;
1.18
1.19 return map_capabilities(mapped_caps, false);
1.20 }
1.21
1.22 -/* Configure the thread environment, employing the given server as the region
1.23 - mapper. Return the capability index for the server in the new task. */
1.24 +/* Configure the thread environment, employing the given capability for the
1.25 + region mapper, returning its capability details in the new task. */
1.26
1.27 -long Process::configure_thread(l4_cap_idx_t server, l4_cap_idx_t *mapped_cap)
1.28 +long Process::configure_thread(l4_cap_idx_t rm, l4_cap_idx_t *mapped_rm)
1.29 {
1.30 /* Employ a distinct region mapper for each thread's environment, this acting
1.31 as pager. */
1.32
1.33 - if ((mapped_cap != NULL) && l4_is_valid_cap(*mapped_cap))
1.34 + if ((mapped_rm != NULL) && l4_is_valid_cap(*mapped_rm))
1.35 {
1.36 - _env.rm = *mapped_cap;
1.37 + _env.rm = *mapped_rm;
1.38 return L4_EOK;
1.39 }
1.40 else
1.41 {
1.42 _env.rm = allocate_cap();
1.43 - *mapped_cap = _env.rm;
1.44 - return ipc_map_capability(_task, (struct ipc_mapped_cap) {_env.rm, server, L4_CAP_FPAGE_RWS, 0});
1.45 + *mapped_rm = _env.rm;
1.46 + return ipc_map_capability(_task, (struct ipc_mapped_cap) {_env.rm, rm, L4_CAP_FPAGE_RWS, 0});
1.47 }
1.48 }
1.49
1.50 /* Set the parent of the new thread. */
1.51
1.52 -long Process::set_parent(l4_cap_idx_t parent, l4_cap_idx_t *rparent)
1.53 +long Process::set_parent(l4_cap_idx_t parent, l4_cap_idx_t *mapped_parent)
1.54 {
1.55 - *rparent = _env.parent;
1.56 + *mapped_parent = _env.parent;
1.57 return ipc_map_capability(_task, (struct ipc_mapped_cap) {_env.parent, parent, L4_CAP_FPAGE_RWS, 0});
1.58 }
1.59
1.60 @@ -191,7 +191,8 @@
1.61
1.62 /* Create, initialise and start a thread. */
1.63
1.64 -long Process::thread_start(l4_addr_t program_start, Stack &st, l4_cap_idx_t *thread, l4_cap_idx_t *rthread)
1.65 +long Process::thread_start(l4_addr_t program_start, Stack &st,
1.66 + l4_cap_idx_t *thread, l4_cap_idx_t *mapped_thread)
1.67 {
1.68 long err;
1.69
1.70 @@ -255,7 +256,7 @@
1.71
1.72 l4_sched_param_t sp = l4_sched_param(L4RE_MAIN_THREAD_PRIO);
1.73
1.74 - *rthread = _env.main_thread;
1.75 + *mapped_thread = _env.main_thread;
1.76 return l4_error(l4_scheduler_run_thread(l4re_env()->scheduler, *thread, &sp));
1.77 }
1.78