Remove Genode::Process from API

This patch makes the former 'Process' class private to the 'Child'
class and changes the constructor of the 'Child' in a way that
principally enables the implementation of single-threaded runtime
environments that virtualize the CPU, PD, and RAM services. The
new interfaces has become free from side effects. I.e., instead
of implicitly using Genode::env()->rm_session(), it takes the reference
to the local region map as argument. Also, the handling of the dynamic
linker via global variables is gone. Now, the linker binary must be
provided as constructor argument.

Fixes #1949
This commit is contained in:
Norman Feske
2016-04-27 16:04:58 +02:00
committed by Christian Helmuth
parent b49e588c1c
commit 7274ca997d
46 changed files with 756 additions and 689 deletions

View File

@@ -111,6 +111,16 @@ class Core_child : public Child_policy
Service_registry &_local_services;
/*
* Dynamic linker, does not need to be valid because init is statically
* linked
*/
Dataspace_capability _ldso_ds;
Pd_session_client _pd;
Ram_session_client _ram;
Cpu_session_client _cpu;
Region_map_client _address_space;
Child _child;
@@ -127,9 +137,10 @@ class Core_child : public Child_policy
:
_entrypoint(nullptr, STACK_SIZE, "init", false),
_local_services(services),
_pd(pd), _ram(ram), _cpu(cpu),
_address_space(Pd_session_client(pd).address_space()),
_child(elf_ds, pd, ram, cpu, _address_space,
&_entrypoint, this,
_child(elf_ds, _ldso_ds, _pd, _pd, _ram, _ram, _cpu, _cpu,
*env()->rm_session(), _address_space, _entrypoint, *this,
*_local_services.find(Pd_session::service_name()),
*_local_services.find(Ram_session::service_name()),
*_local_services.find(Cpu_session::service_name()))