Remove signal-source headers from public API

Those headers implement a platform-specific mechanism. They are never
used by components directly.

This patch also cleans up a few other remaining platform-specific
artifact such as the Fiasco.OC-specific assert.h.

Issue #1993
This commit is contained in:
Norman Feske
2016-07-12 16:33:18 +02:00
parent 0efd5a3078
commit 62d65d00e0
19 changed files with 48 additions and 50 deletions

View File

@ -0,0 +1,22 @@
/*
* \brief Signal-source capability type
* \author Norman Feske
* \date 2016-01-04
*/
/*
* Copyright (C) 2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__SIGNAL_SOURCE__CAPABILITY_H_
#define _INCLUDE__SIGNAL_SOURCE__CAPABILITY_H_
#include <base/capability.h>
#include <signal_source/signal_source.h>
namespace Genode { typedef Capability<Signal_source> Signal_source_capability; }
#endif /* _INCLUDE__SIGNAL_SOURCE__CAPABILITY_H_ */

View File

@ -0,0 +1,31 @@
/*
* \brief Client-side signal-source interface
* \author Norman Feske
* \date 2016-01-04
*/
/*
* Copyright (C) 2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__SIGNAL_SOURCE__CLIENT_H_
#define _INCLUDE__SIGNAL_SOURCE__CLIENT_H_
#include <base/rpc_client.h>
#include <pd_session/pd_session.h>
#include <signal_source/signal_source.h>
namespace Genode { class Signal_source_client; }
struct Genode::Signal_source_client : Rpc_client<Signal_source>
{
Signal_source_client(Capability<Signal_source> signal_source)
: Rpc_client<Signal_source>(signal_source) { }
Signal wait_for_signal() override { return call<Rpc_wait_for_signal>(); }
};
#endif /* _INCLUDE__SIGNAL_SOURCE__CLIENT_H_ */

View File

@ -0,0 +1,28 @@
/*
* \brief Server-side signal-source interface
* \author Norman Feske
* \date 2011-04-12
*
* This class solely exists as a hook to insert platform-specific
* implementation bits (i.e., for the NOVA base platform, there exists
* an enriched version of this class).
*/
/*
* Copyright (C) 2011-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__SIGNAL_SOURCE__RPC_OBJECT_H_
#define _INCLUDE__SIGNAL_SOURCE__RPC_OBJECT_H_
#include <base/rpc_server.h>
#include <signal_source/signal_source.h>
namespace Genode { struct Signal_source_rpc_object; }
struct Genode::Signal_source_rpc_object : Rpc_object<Signal_source> { };
#endif /* _INCLUDE__SIGNAL_SOURCE__RPC_OBJECT_H_ */

View File

@ -0,0 +1,68 @@
/*
* \brief Signal-source interface
* \author Norman Feske
* \date 2010-02-03
*
* This file is only included by 'pd_session/pd_session.h' and relies
* on the headers included there. It is a separate header file to make it
* easily replaceable by a platform-specific implementation.
*/
/*
* Copyright (C) 2010-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__SIGNAL_SOURCE__SIGNAL_SOURCE_H_
#define _INCLUDE__SIGNAL_SOURCE__SIGNAL_SOURCE_H_
namespace Genode { class Signal_source; }
/**
* Blocking part of the PD-session interface
*
* The blocking 'wait_for_signal()' operation cannot be part of the
* PD-session interface because otherwise, context allocations or
* signal submissions would not be possible while blocking for signals.
* Therefore, the blocking part is implemented as a kernel-specific
* special case.
*/
struct Genode::Signal_source
{
class Signal
{
private:
long _imprint;
int _num;
public:
Signal(long imprint, int num) : _imprint(imprint), _num(num) { }
Signal() : _imprint(0), _num(0) { }
long imprint() { return _imprint; }
int num() { return _num; }
};
virtual ~Signal_source() { }
/**
* Wait for signal
*/
virtual Signal wait_for_signal() = 0;
/*********************
** RPC declaration **
*********************/
GENODE_RPC(Rpc_wait_for_signal, Signal, wait_for_signal);
GENODE_RPC_INTERFACE(Rpc_wait_for_signal);
};
#endif /* _INCLUDE__SIGNAL_SOURCE__SIGNAL_SOURCE_H_ */

View File

@ -19,6 +19,7 @@
/* base-internal includes */
#include <base/internal/ipc_server.h>
#include <signal_source/signal_source.h>
using namespace Genode;

View File

@ -18,11 +18,11 @@
#include <base/thread.h>
#include <base/sleep.h>
#include <base/trace/events.h>
#include <signal_source/client.h>
#include <util/volatile_object.h>
/* base-internal includes */
#include <base/internal/globals.h>
#include <signal_source/client.h>
using namespace Genode;