Separation of thread operations from CPU session

This patch moves the thread operations from the 'Cpu_session'
to the 'Cpu_thread' interface.

A noteworthy semantic change is the meaning of the former
'exception_handler' function, which used to define both, the default
exception handler or a thread-specific signal handler. Now, the
'Cpu_session::exception_sigh' function defines the CPU-session-wide
default handler whereas the 'Cpu_thread::exception_sigh' function
defines the thread-specific one.

To retain the ability to create 'Child' objects without invoking a
capability, the child's initial thread must be created outside the
'Child::Process'. It is now represented by the 'Child::Initial_thread',
which is passed as argument to the 'Child' constructor.

Fixes #1939
This commit is contained in:
Norman Feske
2016-05-10 18:05:38 +02:00
committed by Christian Helmuth
parent 59aec6114b
commit a99989af40
66 changed files with 1261 additions and 1384 deletions

View File

@@ -171,6 +171,8 @@ class Launchpad_child : public Genode::List<Launchpad_child>::Element
Genode::Ram_session_client _ram;
Genode::Cpu_session_client _cpu;
Genode::Child::Initial_thread _initial_thread;
Genode::Server _server;
Launchpad_child_policy _policy;
@@ -193,12 +195,13 @@ class Launchpad_child : public Genode::List<Launchpad_child>::Element
_launchpad(launchpad),
_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),
_rom(rom), _pd(pd), _ram(ram), _cpu(cpu),
_initial_thread(_cpu, _pd, name), _server(_ram),
_policy(name, &_server, parent_services, child_services,
config_ds, elf_ds, &_entrypoint),
_child(elf_ds, _ldso_ds(), _pd, _pd, _ram, _ram, _cpu, _cpu,
*Genode::env()->rm_session(), _address_space,
_entrypoint, _policy)
_child(elf_ds, _ldso_ds(), _pd, _pd, _ram, _ram, _cpu,
_initial_thread, *Genode::env()->rm_session(),
_address_space, _entrypoint, _policy)
{
_entrypoint.activate();
}