genode/repos/base-foc/src/include/signal_source/client.h

67 lines
1.6 KiB
C
Raw Normal View History

2011-12-22 16:19:25 +01:00
/*
* \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.
2011-12-22 16:19:25 +01:00
*/
/*
* Copyright (C) 2010-2017 Genode Labs GmbH
2011-12-22 16:19:25 +01:00
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
2011-12-22 16:19:25 +01:00
*/
#ifndef _INCLUDE__SIGNAL_SOURCE__CLIENT_H_
#define _INCLUDE__SIGNAL_SOURCE__CLIENT_H_
2011-12-22 16:19:25 +01:00
#include <base/rpc_client.h>
#include <base/thread.h>
#include <signal_source/foc_signal_source.h>
2011-12-22 16:19:25 +01:00
namespace Genode { class Signal_source_client; }
2011-12-22 16:19:25 +01:00
class Genode::Signal_source_client : public Rpc_client<Foc_signal_source>
{
private:
2011-12-22 16:19:25 +01:00
/**
* Capability with 'dst' referring to a Fiasco.OC IRQ object
*/
Native_capability _sem;
2011-12-22 16:19:25 +01:00
public:
2011-12-22 16:19:25 +01:00
/**
* Constructor
*/
Signal_source_client(Capability<Signal_source> cap);
2011-12-22 16:19:25 +01:00
/**
* Destructor
*/
~Signal_source_client();
2011-12-22 16:19:25 +01:00
/*****************************
** Signal source interface **
*****************************/
2011-12-22 16:19:25 +01:00
/*
* Build with frame pointer to make GDB backtraces work. See issue #1061.
*/
__attribute__((optimize("-fno-omit-frame-pointer")))
Signal wait_for_signal() override;
};
2011-12-22 16:19:25 +01:00
#endif /* _INCLUDE__SIGNAL_SOURCE__CLIENT_H_ */