From 32f9d1fcebb87e7a7f11b8f02019d5ed33eafd37 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 21 Feb 2023 14:45:26 +0100 Subject: [PATCH] os: remove server/input_event_bridge This component was solely used during the transition of the input-session to the event-session interface. Fixes #4767 --- .../recipes/src/input_event_bridge/content.mk | 2 - repos/os/recipes/src/input_event_bridge/hash | 1 - .../recipes/src/input_event_bridge/used_apis | 4 - .../os/src/server/input_event_bridge/main.cc | 96 ------------------- .../src/server/input_event_bridge/target.mk | 3 - 5 files changed, 106 deletions(-) delete mode 100644 repos/os/recipes/src/input_event_bridge/content.mk delete mode 100644 repos/os/recipes/src/input_event_bridge/hash delete mode 100644 repos/os/recipes/src/input_event_bridge/used_apis delete mode 100644 repos/os/src/server/input_event_bridge/main.cc delete mode 100644 repos/os/src/server/input_event_bridge/target.mk diff --git a/repos/os/recipes/src/input_event_bridge/content.mk b/repos/os/recipes/src/input_event_bridge/content.mk deleted file mode 100644 index a55b5a0699..0000000000 --- a/repos/os/recipes/src/input_event_bridge/content.mk +++ /dev/null @@ -1,2 +0,0 @@ -SRC_DIR = src/server/input_event_bridge -include $(GENODE_DIR)/repos/base/recipes/src/content.inc diff --git a/repos/os/recipes/src/input_event_bridge/hash b/repos/os/recipes/src/input_event_bridge/hash deleted file mode 100644 index e5a69ac271..0000000000 --- a/repos/os/recipes/src/input_event_bridge/hash +++ /dev/null @@ -1 +0,0 @@ -2023-01-23 8d2990d998cbbcedc4f88c3dc0cec2a1cf71fcfa diff --git a/repos/os/recipes/src/input_event_bridge/used_apis b/repos/os/recipes/src/input_event_bridge/used_apis deleted file mode 100644 index a2645a0156..0000000000 --- a/repos/os/recipes/src/input_event_bridge/used_apis +++ /dev/null @@ -1,4 +0,0 @@ -base -os -event_session -input_session diff --git a/repos/os/src/server/input_event_bridge/main.cc b/repos/os/src/server/input_event_bridge/main.cc deleted file mode 100644 index f562001366..0000000000 --- a/repos/os/src/server/input_event_bridge/main.cc +++ /dev/null @@ -1,96 +0,0 @@ -/* - * \brief Service for connecting an input client with an event client - * \author Norman Feske - * \date 2020-07-02 - */ - -/* - * Copyright (C) 2020 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. - */ - -/* Genode includes */ -#include -#include -#include -#include -#include -#include - -namespace Input_event_bridge { - - using namespace Genode; - - struct Event_session; - struct Main; -} - - -struct Input_event_bridge::Event_session : Rpc_object -{ - Attached_ram_dataspace _ds; - - Input::Session_component &_input_session; - - Dataspace_capability dataspace() { return _ds.cap(); } - - void submit_batch(unsigned count) - { - unsigned const max_events = (unsigned)(_ds.size() / sizeof(Input::Event)); - - if (count > max_events) - warning("number of events exceeds dataspace capacity"); - - count = min(count, max_events); - - Input::Event const * const events = _ds.local_addr(); - - for (unsigned i = 0; i < count; i++) - _input_session.submit(events[i]); - } - - Event_session(Env &env, Input::Session_component &input_session) - : - _ds(env.ram(), env.rm(), 4096), _input_session(input_session) - { } -}; - - -/****************** - ** Main program ** - ******************/ - -struct Input_event_bridge::Main -{ - Env &_env; - - Attached_ram_dataspace _ds { _env.ram(), _env.rm(), 4096 }; - - Input::Session_component _input_session { _env, _env.ram() }; - Event_session _event_session { _env, _input_session }; - - /* - * Attach root interfaces to the entry point - */ - Static_root _input_root { _env.ep().manage(_input_session) }; - Static_root _event_root { _env.ep().manage(_event_session) }; - - /** - * Constructor - */ - Main(Env &env) : _env(env) - { - _input_session.event_queue().enabled(true); - - _env.parent().announce(env.ep().manage(_input_root)); - _env.parent().announce(env.ep().manage(_event_root)); - } -}; - - -void Component::construct(Genode::Env &env) -{ - static Input_event_bridge::Main inst(env); -} diff --git a/repos/os/src/server/input_event_bridge/target.mk b/repos/os/src/server/input_event_bridge/target.mk deleted file mode 100644 index 8eca320bd8..0000000000 --- a/repos/os/src/server/input_event_bridge/target.mk +++ /dev/null @@ -1,3 +0,0 @@ -TARGET = input_event_bridge -SRC_CC = main.cc -LIBS = base