mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-21 08:29:41 +00:00
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:
@ -16,12 +16,12 @@
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/native_capability.h>
|
||||
#include <util/assert.h>
|
||||
#include <util/construct_at.h>
|
||||
#include <foc/native_capability.h>
|
||||
|
||||
/* base-internal includes */
|
||||
#include <base/internal/cap_map.h>
|
||||
#include <base/internal/foc_assert.h>
|
||||
|
||||
namespace Genode {
|
||||
|
||||
|
32
repos/base-foc/src/include/base/internal/foc_assert.h
Normal file
32
repos/base-foc/src/include/base/internal/foc_assert.h
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* \brief Assertion macros for Fiasco.OC
|
||||
* \author Stefan Kalkowski
|
||||
* \date 2012-05-25
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2006-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__BASE__INTERNAL__FOC_ASSERT_H_
|
||||
#define _INCLUDE__BASE__INTERNAL__FOC_ASSERT_H_
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
|
||||
/* Fiasco includes */
|
||||
namespace Fiasco {
|
||||
#include <l4/sys/kdebug.h>
|
||||
}
|
||||
|
||||
#define ASSERT(e, s) \
|
||||
do { if (!(e)) { \
|
||||
Genode::raw("assertion failed: ", s, __FILE__, __LINE__); \
|
||||
enter_kdebug("ASSERT"); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#endif /* _INCLUDE__BASE__INTERNAL__FOC_ASSERT_H_ */
|
66
repos/base-foc/src/include/signal_source/client.h
Normal file
66
repos/base-foc/src/include/signal_source/client.h
Normal file
@ -0,0 +1,66 @@
|
||||
/*
|
||||
* \brief Fiasco.OC-specific signal-source client interface
|
||||
* \author Norman Feske
|
||||
* \author Stefan Kalkowski
|
||||
* \date 2010-02-03
|
||||
*
|
||||
* On Fiasco.OC, the signal source server does not provide a blocking
|
||||
* 'wait_for_signal' function because this kernel does not support out-of-order
|
||||
* IPC replies. Instead, we use an IRQ kernel-object to let the client block
|
||||
* until a signal is present at the server.
|
||||
*
|
||||
* We request the IRQ object capability and attach to the IRQ on construction
|
||||
* of the 'Signal_source_client' object.
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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__CLIENT_H_
|
||||
#define _INCLUDE__SIGNAL_SOURCE__CLIENT_H_
|
||||
|
||||
#include <base/rpc_client.h>
|
||||
#include <base/thread.h>
|
||||
#include <signal_source/foc_signal_source.h>
|
||||
|
||||
namespace Genode { class Signal_source_client; }
|
||||
|
||||
|
||||
class Genode::Signal_source_client : public Rpc_client<Foc_signal_source>
|
||||
{
|
||||
private:
|
||||
|
||||
/**
|
||||
* Capability with 'dst' referring to a Fiasco.OC IRQ object
|
||||
*/
|
||||
Native_capability _sem;
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
Signal_source_client(Capability<Signal_source> cap);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
~Signal_source_client();
|
||||
|
||||
|
||||
/*****************************
|
||||
** Signal source interface **
|
||||
*****************************/
|
||||
|
||||
/*
|
||||
* Build with frame pointer to make GDB backtraces work. See issue #1061.
|
||||
*/
|
||||
__attribute__((optimize("-fno-omit-frame-pointer")))
|
||||
Signal wait_for_signal();
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__SIGNAL_SOURCE__CLIENT_H_ */
|
30
repos/base-foc/src/include/signal_source/foc_signal_source.h
Normal file
30
repos/base-foc/src/include/signal_source/foc_signal_source.h
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* \brief Fiasco.OC-specific signal source RPC interface
|
||||
* \author Norman Feske
|
||||
* \author Stefan Kalkowski
|
||||
* \date 2011-04-12
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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__FOC_SIGNAL_SOURCE_H_
|
||||
#define _INCLUDE__SIGNAL_SOURCE__FOC_SIGNAL_SOURCE_H_
|
||||
|
||||
#include <signal_source/signal_source.h>
|
||||
#include <base/rpc_server.h>
|
||||
|
||||
namespace Genode { struct Foc_signal_source; }
|
||||
|
||||
|
||||
struct Genode::Foc_signal_source : Signal_source
|
||||
{
|
||||
GENODE_RPC(Rpc_request_semaphore, Native_capability, _request_semaphore);
|
||||
GENODE_RPC_INTERFACE_INHERIT(Signal_source, Rpc_request_semaphore);
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__SIGNAL_SOURCE__FOC_SIGNAL_SOURCE_H_ */
|
38
repos/base-foc/src/include/signal_source/rpc_object.h
Normal file
38
repos/base-foc/src/include/signal_source/rpc_object.h
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* \brief Signal-source server interface
|
||||
* \author Norman Feske
|
||||
* \date 2010-02-03
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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__RPC_OBJECT_H_
|
||||
#define _INCLUDE__SIGNAL_SOURCE__RPC_OBJECT_H_
|
||||
|
||||
#include <base/rpc_server.h>
|
||||
#include <signal_source/foc_signal_source.h>
|
||||
|
||||
namespace Genode { struct Signal_source_rpc_object; }
|
||||
|
||||
|
||||
struct Genode::Signal_source_rpc_object : Rpc_object<Foc_signal_source,
|
||||
Signal_source_rpc_object>
|
||||
{
|
||||
protected:
|
||||
|
||||
Native_capability _blocking_semaphore;
|
||||
|
||||
public:
|
||||
|
||||
Signal_source_rpc_object(Native_capability cap)
|
||||
: _blocking_semaphore(cap) {}
|
||||
|
||||
Native_capability _request_semaphore() { return _blocking_semaphore; }
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__SIGNAL_SOURCE__RPC_OBJECT_H_ */
|
Reference in New Issue
Block a user