mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 07:38:28 +00:00
Use signals for delivering input events
This patch changes both the Input::Session interface and the skeleton for the server-side implementation of this interface ('input/component.h'). The Input::Session interface offers a new 'sigh' function, which can be called be the client to register a signal handler. The signal handler gets notified on the arrival of new input. This alleviates the need to poll for input events at the client side. The server-side skeleton for implementing input services underwent a redesign to make it more modular and robust. I.e., there are no global functions needed at the server side and the event-queue enable/disable mechanism is implemented at a central place (in the root component) rather than inside each driver. Fixes #46
This commit is contained in:
committed by
Christian Helmuth
parent
6c10bfe049
commit
0ed68a56b7
@ -17,6 +17,7 @@
|
||||
#include <dataspace/capability.h>
|
||||
#include <base/rpc_server.h>
|
||||
#include <session/session.h>
|
||||
#include <base/signal.h>
|
||||
|
||||
namespace Input {
|
||||
|
||||
@ -45,6 +46,11 @@ namespace Input {
|
||||
*/
|
||||
virtual int flush() = 0;
|
||||
|
||||
/**
|
||||
* Register signal handler to be notified on arrival of new input
|
||||
*/
|
||||
virtual void sigh(Genode::Signal_context_capability) = 0;
|
||||
|
||||
|
||||
/*********************
|
||||
** RPC declaration **
|
||||
@ -53,8 +59,9 @@ namespace Input {
|
||||
GENODE_RPC(Rpc_dataspace, Genode::Dataspace_capability, dataspace);
|
||||
GENODE_RPC(Rpc_is_pending, bool, is_pending);
|
||||
GENODE_RPC(Rpc_flush, int, flush);
|
||||
GENODE_RPC(Rpc_sigh, void, sigh, Genode::Signal_context_capability);
|
||||
|
||||
GENODE_RPC_INTERFACE(Rpc_dataspace, Rpc_is_pending, Rpc_flush);
|
||||
GENODE_RPC_INTERFACE(Rpc_dataspace, Rpc_is_pending, Rpc_flush, Rpc_sigh);
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user