/*
* \brief Signal-delivery mechanism
* \author Norman Feske
* \date 2009-08-05
*/
/*
* Copyright (C) 2009-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.
*/
#ifndef _CORE__SIGNAL_SOURCE_COMPONENT_H_
#define _CORE__SIGNAL_SOURCE_COMPONENT_H_
/* Genode includes */
#include
/* core-local includes */
#include
#include
#include
namespace Genode {
class Signal_context_component;
class Signal_source_component;
typedef Object_pool Signal_context_pool;
typedef Object_pool Signal_source_pool;
}
struct Genode::Signal_context_component : private Kernel_object,
public Signal_context_pool::Entry
{
friend class Object_pool;
using Signal_context_pool::Entry::cap;
inline Signal_context_component(Signal_source_component &s,
addr_t const imprint);
Signal_source_component *source() { ASSERT_NEVER_CALLED; }
};
struct Genode::Signal_source_component : private Kernel_object,
public Signal_source_pool::Entry
{
friend class Object_pool;
friend class Signal_context_component;
using Signal_source_pool::Entry::cap;
Signal_source_component()
: Kernel_object(true),
Signal_source_pool::Entry(Kernel_object::cap())
{ }
void submit(Signal_context_component *, unsigned long) { ASSERT_NEVER_CALLED; }
Kernel::Signal_receiver & signal_receiver() {
return **static_cast*>(this); }
};
Genode::Signal_context_component::Signal_context_component(Signal_source_component &s,
addr_t const imprint)
:
Kernel_object(true, s.signal_receiver(), imprint),
Signal_context_pool::Entry(Kernel_object::_cap)
{ }
#endif /* _CORE__SIGNAL_SOURCE_COMPONENT_H_ */