genode/repos/base/src/lib/base/signal_transmitter.cc
Norman Feske a1df4fee44 base: restructure signal-submit initialization
This patch allows core's 'Signal_transmitter' implementation to sidestep
the 'Env::Pd' interface and thereby adhere to a stricter layering within
core. The 'Signal_transmitter' now uses - on kernels that depend on it -
a dedicated (and fairly freestanding) RPC proxy mechanism for signal
deliver, instead of channeling signals through the 'Pd_session::submit'
RPC function.
2017-05-31 13:16:12 +02:00

42 lines
830 B
C++

/*
* \brief Generic implementation parts of the signaling framework
* \author Norman Feske
* \author Alexander Boettcher
* \date 2015-03-17
*/
/*
* Copyright (C) 2015-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
/* Genode includes */
#include <base/env.h>
#include <base/trace/events.h>
#include <base/signal.h>
/* base-internal includes */
#include <base/internal/globals.h>
using namespace Genode;
static Pd_session *_pd;
void Genode::init_signal_transmitter(Env &env) { _pd = &env.pd(); }
void Signal_transmitter::submit(unsigned cnt)
{
{
Trace::Signal_submit trace_event(cnt);
}
if (_pd)
_pd->submit(_context, cnt);
else
warning("missing call of 'init_signal_submit'");
}