base: explictly target entrypoint in timer session

Fix #3548
This commit is contained in:
Stefan Kalkowski 2019-11-08 13:23:16 +01:00 committed by Norman Feske
parent 3ac970ac1d
commit 18dbd75860
3 changed files with 21 additions and 2 deletions

View File

@ -258,6 +258,18 @@ class Timer::Connection : public Genode::Connection<Session>,
/**
* Constructor
*
* \param env environment used for construction (e.g. quota trading)
* \param ep entrypoint used as timeout handler execution context
* \param label optional label used in session routing
*/
Connection(Genode::Env &env,
Genode::Entrypoint & ep,
char const *label = "");
/**
* Convenience constructor wrapper using the environment's entrypoint as
* timeout handler execution context
*/
Connection(Genode::Env &env, char const *label = "");

View File

@ -53,6 +53,8 @@ _ZN5Timer10Connection8_discardERN6Genode7TimeoutE T
_ZN5Timer10Connection9curr_timeEv T
_ZN5Timer10ConnectionC1ERN6Genode3EnvEPKc T
_ZN5Timer10ConnectionC2ERN6Genode3EnvEPKc T
_ZN5Timer10ConnectionC1ERN6Genode3EnvERNS1_10EntrypointEPKc T
_ZN5Timer10ConnectionC2ERN6Genode3EnvERNS1_10EntrypointEPKc T
_ZN6Genode10Entrypoint16_dispatch_signalERNS_6SignalE T
_ZN6Genode10Entrypoint16schedule_suspendEPFvvES2_ T
_ZN6Genode10Entrypoint22Signal_proxy_component6signalEv T

View File

@ -127,19 +127,24 @@ void Timer::Connection::_enable_modern_mode()
}
Timer::Connection::Connection(Genode::Env &env, char const *label)
Timer::Connection::Connection(Genode::Env &env, Genode::Entrypoint &ep,
char const *label)
:
Genode::Connection<Session>(env, session(env.parent(),
"ram_quota=10K, cap_quota=%u, label=\"%s\"",
CAP_QUOTA, label)),
Session_client(cap()),
_signal_handler(env.ep(), *this, &Connection::_handle_timeout)
_signal_handler(ep, *this, &Connection::_handle_timeout)
{
/* register default signal handler */
Session_client::sigh(_default_sigh_cap);
}
Timer::Connection::Connection(Genode::Env &env, char const *label)
: Timer::Connection(env, env.ep(), label) {}
void Timer::Connection::_schedule_one_shot(Timeout &timeout, Microseconds duration)
{
_enable_modern_mode();