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:
committed by
Christian Helmuth
parent
b49e588c1c
commit
7274ca997d
@@ -152,12 +152,9 @@ class Launchpad_child : public Genode::List<Launchpad_child>::Element
|
||||
{
|
||||
private:
|
||||
|
||||
Launchpad *_launchpad;
|
||||
static Genode::Dataspace_capability _ldso_ds();
|
||||
|
||||
Genode::Rom_session_capability _rom;
|
||||
Genode::Ram_session_capability _ram;
|
||||
Genode::Cpu_session_capability _cpu;
|
||||
Genode::Server _server;
|
||||
Launchpad *_launchpad;
|
||||
|
||||
/*
|
||||
* Entry point used for serving the parent interface and the
|
||||
@@ -167,7 +164,14 @@ class Launchpad_child : public Genode::List<Launchpad_child>::Element
|
||||
enum { ENTRYPOINT_STACK_SIZE = 12*1024 };
|
||||
Genode::Rpc_entrypoint _entrypoint;
|
||||
|
||||
Genode::Region_map_client _address_space;
|
||||
Genode::Region_map_client _address_space;
|
||||
|
||||
Genode::Rom_session_client _rom;
|
||||
Genode::Pd_session_client _pd;
|
||||
Genode::Ram_session_client _ram;
|
||||
Genode::Cpu_session_client _cpu;
|
||||
|
||||
Genode::Server _server;
|
||||
|
||||
Launchpad_child_policy _policy;
|
||||
Genode::Child _child;
|
||||
@@ -187,13 +191,17 @@ class Launchpad_child : public Genode::List<Launchpad_child>::Element
|
||||
Launchpad *launchpad)
|
||||
:
|
||||
_launchpad(launchpad),
|
||||
_rom(rom), _ram(ram), _cpu(cpu), _server(_ram),
|
||||
_entrypoint(cap_session, ENTRYPOINT_STACK_SIZE, name, false),
|
||||
_address_space(Genode::Pd_session_client(pd).address_space()),
|
||||
_rom(rom), _pd(pd), _ram(ram), _cpu(cpu), _server(_ram),
|
||||
_policy(name, &_server, parent_services, child_services,
|
||||
config_ds, elf_ds, &_entrypoint),
|
||||
_child(elf_ds, pd, ram, cpu, _address_space, &_entrypoint, &_policy) {
|
||||
_entrypoint.activate(); }
|
||||
_child(elf_ds, _ldso_ds(), _pd, _pd, _ram, _ram, _cpu, _cpu,
|
||||
*Genode::env()->rm_session(), _address_space,
|
||||
_entrypoint, _policy)
|
||||
{
|
||||
_entrypoint.activate();
|
||||
}
|
||||
|
||||
Genode::Rom_session_capability rom_session_cap() { return _rom; }
|
||||
Genode::Ram_session_capability ram_session_cap() { return _ram; }
|
||||
|
||||
Reference in New Issue
Block a user