From 5ed5fddb7cb839a685a6a6e0aa12c712f9a84069 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 30 Jan 2019 17:27:46 +0100 Subject: [PATCH] base/os: remove deprecated APIs This commit removes APIs that were previously marked as deprecated. This change has the following implications: - The use of the global 'env()' accessor is not possible anymore. - Boolean accessor methods are no longer prefixed with 'is_'. E.g., instead of 'is_valid()', use 'valid()'. - The last traces of 'Ram_session' are gone now. The 'Env::ram()' accessor returns the 'Ram_allocator' interface, which is a subset of the 'Pd_session' interface. - All connection constructors need the 'Env' as argument. - The 'Reporter' constructor needs an 'Env' argument now because the reporter creates a report connection. - The old overload 'Child_policy::resolve_session_request' that returned a 'Service' does not exist anymore. - The base/printf.h header has been removed, use base/log.h instead. - The old notion of 'Signal_dispatcher' is gone. Use 'Signal_handler'. - Transitional headers like os/server.h, cap_session/, volatile_object.h, os/attached*_dataspace.h, signal_rpc_dispatcher.h have been removed. - The distinction between 'Thread_state' and 'Thread_state_base' does not exist anymore. - The header cpu_thread/capability.h along with the type definition of 'Cpu_thread_capability' has been removed. Use the type 'Thread_capability' define in cpu_session/cpu_session.h instead. - Several XML utilities (i.e., at os/include/decorator) could be removed because their functionality is nowadays covered by util/xml_node.h. - The 'os/ram_session_guard.h' has been removed. Use 'Constrained_ram_allocator' provided by base/ram_allocator.h instead. Issue #1987 --- repos/base-hw/src/core/platform_thread.cc | 2 +- .../src/include/base/internal/platform_env.h | 4 +- .../base-linux/src/lib/base/child_process.cc | 2 +- repos/base/include/base/allocator.h | 6 - repos/base/include/base/allocator_avl.h | 2 +- repos/base/include/base/attached_dataspace.h | 10 -- .../include/base/attached_io_mem_dataspace.h | 43 ++---- .../include/base/attached_ram_dataspace.h | 15 --- .../include/base/attached_rom_dataspace.h | 19 --- repos/base/include/base/child.h | 48 ++----- repos/base/include/base/connection.h | 40 ------ repos/base/include/base/env.h | 27 +--- repos/base/include/base/heap.h | 11 +- .../base/include/base/native_capability_tpl.h | 123 ------------------ repos/base/include/base/printf.h | 90 ------------- repos/base/include/base/quota_transfer.h | 5 +- repos/base/include/base/rpc_args.h | 8 -- repos/base/include/base/rpc_client.h | 7 - repos/base/include/base/service.h | 19 +-- repos/base/include/base/session_state.h | 2 +- repos/base/include/base/signal.h | 77 ----------- repos/base/include/base/slab.h | 12 +- repos/base/include/base/thread.h | 1 - repos/base/include/base/thread_state.h | 14 +- repos/base/include/base/thread_state_base.h | 32 ----- repos/base/include/base/trace/buffer.h | 5 - repos/base/include/base/weak_ptr.h | 8 -- repos/base/include/cap_session/cap_session.h | 29 ----- repos/base/include/cap_session/connection.h | 47 ------- repos/base/include/cpu_session/connection.h | 33 +---- repos/base/include/cpu_session/cpu_session.h | 3 +- repos/base/include/cpu_thread/capability.h | 22 ---- repos/base/include/deprecated/env.h | 17 --- .../base/include/io_mem_session/connection.h | 48 +------ .../base/include/io_port_session/connection.h | 19 +-- repos/base/include/irq_session/connection.h | 40 +----- repos/base/include/log_session/connection.h | 14 -- repos/base/include/pd_session/client.h | 4 +- repos/base/include/pd_session/connection.h | 13 -- repos/base/include/pd_session/pd_session.h | 1 - repos/base/include/ram_session/capability.h | 29 ----- repos/base/include/ram_session/ram_session.h | 23 ---- repos/base/include/region_map/region_map.h | 1 - repos/base/include/rm_session/connection.h | 13 -- repos/base/include/rom_session/connection.h | 96 ++++---------- repos/base/include/thread/capability.h | 23 ---- repos/base/include/timer_session/connection.h | 9 -- repos/base/include/trace_session/connection.h | 35 +---- repos/base/include/util/reconstructible.h | 7 - repos/base/include/util/register_set.h | 75 ----------- repos/base/include/util/volatile_object.h | 38 ------ repos/base/include/vm_session/connection.h | 15 --- repos/base/include/vm_session/vm_session.h | 3 +- repos/base/src/core/include/core_env.h | 1 - .../src/include/base/internal/platform_env.h | 1 - repos/base/src/lib/base/child.cc | 37 +----- repos/base/src/lib/base/child_process.cc | 2 +- .../base/src/lib/base/env_session_id_space.cc | 8 -- .../base/src/lib/timeout/timer_connection.cc | 11 -- .../os/include/audio_out_session/connection.h | 31 +---- repos/os/include/block_session/connection.h | 33 +---- repos/os/include/block_session/rpc_object.h | 10 -- repos/os/include/decorator/xml_utils.h | 84 +----------- repos/os/include/file_system/util.h | 11 -- .../include/file_system_session/connection.h | 113 +++++----------- .../file_system_session/file_system_session.h | 14 -- .../include/framebuffer_session/connection.h | 16 --- repos/os/include/gpio_session/connection.h | 13 -- repos/os/include/input_session/client.h | 12 -- repos/os/include/input_session/connection.h | 29 +---- .../os/include/input_session/input_session.h | 8 -- repos/os/include/loader_session/connection.h | 13 -- repos/os/include/nic_session/connection.h | 41 +----- repos/os/include/nic_session/rpc_object.h | 17 +-- repos/os/include/nitpicker_session/client.h | 13 -- .../os/include/nitpicker_session/connection.h | 18 --- .../nitpicker_session/nitpicker_session.h | 8 -- repos/os/include/os/attached_dataspace.h | 23 ---- .../os/include/os/attached_io_mem_dataspace.h | 23 ---- repos/os/include/os/attached_ram_dataspace.h | 23 ---- repos/os/include/os/attached_rom_dataspace.h | 23 ---- repos/os/include/os/path.h | 15 --- repos/os/include/os/ram_session_guard.h | 103 --------------- repos/os/include/os/reporter.h | 40 ++---- repos/os/include/os/server.h | 42 ------ repos/os/include/os/signal_rpc_dispatcher.h | 69 ---------- .../os/include/platform_session/connection.h | 11 -- .../os/include/regulator_session/connection.h | 30 +---- repos/os/include/report_session/connection.h | 52 +------- repos/os/include/rtc_session/connection.h | 13 -- .../imx_framebuffer_session/connection.h | 14 -- .../spec/x86/platform_session/connection.h | 17 +-- repos/os/include/terminal_session/client.h | 6 - .../os/include/terminal_session/connection.h | 16 --- repos/os/include/uart_session/client.h | 5 - repos/os/include/uart_session/connection.h | 15 --- repos/os/include/usb/usb.h | 10 +- repos/os/include/usb_session/connection.h | 35 +---- repos/os/include/usb_session/usb_session.h | 8 -- repos/os/include/util/color.h | 6 - repos/os/lib/mk/server.mk | 3 - repos/os/src/lib/server/server.cc | 38 ------ 102 files changed, 198 insertions(+), 2275 deletions(-) delete mode 100644 repos/base/include/base/native_capability_tpl.h delete mode 100644 repos/base/include/base/printf.h delete mode 100644 repos/base/include/base/thread_state_base.h delete mode 100644 repos/base/include/cap_session/cap_session.h delete mode 100644 repos/base/include/cap_session/connection.h delete mode 100644 repos/base/include/cpu_thread/capability.h delete mode 100644 repos/base/include/ram_session/capability.h delete mode 100644 repos/base/include/ram_session/ram_session.h delete mode 100644 repos/base/include/thread/capability.h delete mode 100644 repos/base/include/util/volatile_object.h delete mode 100644 repos/os/include/os/attached_dataspace.h delete mode 100644 repos/os/include/os/attached_io_mem_dataspace.h delete mode 100644 repos/os/include/os/attached_ram_dataspace.h delete mode 100644 repos/os/include/os/attached_rom_dataspace.h delete mode 100644 repos/os/include/os/ram_session_guard.h delete mode 100644 repos/os/include/os/server.h delete mode 100644 repos/os/include/os/signal_rpc_dispatcher.h delete mode 100644 repos/os/lib/mk/server.mk delete mode 100644 repos/os/src/lib/server/server.cc diff --git a/repos/base-hw/src/core/platform_thread.cc b/repos/base-hw/src/core/platform_thread.cc index f8b7029ba..6c524cae6 100644 --- a/repos/base-hw/src/core/platform_thread.cc +++ b/repos/base-hw/src/core/platform_thread.cc @@ -200,7 +200,7 @@ Genode::Pager_object &Platform_thread::pager() Thread_state Platform_thread::state() { - Thread_state_base bstate(*_kobj.kernel_object()->regs); + Thread_state bstate(*_kobj.kernel_object()->regs); return Thread_state(bstate); } diff --git a/repos/base-linux/src/include/base/internal/platform_env.h b/repos/base-linux/src/include/base/internal/platform_env.h index 7ce68f408..2faf7b93a 100644 --- a/repos/base-linux/src/include/base/internal/platform_env.h +++ b/repos/base-linux/src/include/base/internal/platform_env.h @@ -133,9 +133,7 @@ class Genode::Platform_env : public Platform_env_base ** Env_deprecated interface ** ******************************/ - Parent *parent() override { return &_parent(); } - Allocator *heap() override { return &_heap; } - + Parent *parent() override { return &_parent(); } }; #endif /* _INCLUDE__BASE__INTERNAL__PLATFORM_ENV_H_ */ diff --git a/repos/base-linux/src/lib/base/child_process.cc b/repos/base-linux/src/lib/base/child_process.cc index 48fd021c3..34acee2e8 100644 --- a/repos/base-linux/src/lib/base/child_process.cc +++ b/repos/base-linux/src/lib/base/child_process.cc @@ -52,7 +52,7 @@ void Child::Initial_thread::start(addr_t) { } */ Child::Process::Loaded_executable::Loaded_executable(Type, Dataspace_capability, - Ram_session &, + Ram_allocator &, Region_map &, Region_map &, Parent_capability) { } diff --git a/repos/base/include/base/allocator.h b/repos/base/include/base/allocator.h index 97ca0b42c..b20b48f4e 100644 --- a/repos/base/include/base/allocator.h +++ b/repos/base/include/base/allocator.h @@ -164,12 +164,6 @@ struct Genode::Range_allocator : Allocator bool ok() const { return value == OK; } bool error() const { return !ok(); } - - /* - * \deprecated use 'ok' and 'error' instead - */ - bool is_ok() const { return ok(); } - bool is_error() const { return error(); } }; /** diff --git a/repos/base/include/base/allocator_avl.h b/repos/base/include/base/allocator_avl.h index af50f6eb6..0716f3bd1 100644 --- a/repos/base/include/base/allocator_avl.h +++ b/repos/base/include/base/allocator_avl.h @@ -338,7 +338,7 @@ class Genode::Allocator_avl_tpl : public Allocator_avl_base explicit Allocator_avl_tpl(Allocator *metadata_chunk_alloc) : Allocator_avl_base(&_metadata, sizeof(Block)), _metadata((metadata_chunk_alloc) ? metadata_chunk_alloc : this, - (Slab_block *)&_initial_md_block) { } + (Block *)&_initial_md_block) { } ~Allocator_avl_tpl() { _revert_allocations_and_ranges(); } diff --git a/repos/base/include/base/attached_dataspace.h b/repos/base/include/base/attached_dataspace.h index 460761a3f..ade39b1a6 100644 --- a/repos/base/include/base/attached_dataspace.h +++ b/repos/base/include/base/attached_dataspace.h @@ -63,16 +63,6 @@ class Genode::Attached_dataspace : Noncopyable Attached_dataspace(Region_map &rm, Dataspace_capability ds) : _ds(_check(ds)), _rm(rm), _local_addr(_rm.attach(_ds)) { } - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Region_map &' as first - * argument instead - */ - Attached_dataspace(Dataspace_capability ds) __attribute__((deprecated)) - : _ds(_check(ds)), _rm(*env_deprecated()->rm_session()), _local_addr(_rm.attach(_ds)) { } - /** * Destructor */ diff --git a/repos/base/include/base/attached_io_mem_dataspace.h b/repos/base/include/base/attached_io_mem_dataspace.h index fe6139230..315761a2e 100644 --- a/repos/base/include/base/attached_io_mem_dataspace.h +++ b/repos/base/include/base/attached_io_mem_dataspace.h @@ -31,16 +31,15 @@ class Genode::Attached_io_mem_dataspace { private: - /* - * Noncopyable - */ - Attached_io_mem_dataspace(Attached_io_mem_dataspace const &); - Attached_io_mem_dataspace &operator = (Attached_io_mem_dataspace const &); + Region_map &_env_rm; + Io_mem_connection _mmio; + Io_mem_dataspace_capability _ds; + Region_map::Local_addr _local_addr; - Region_map &_env_rm; - Io_mem_connection _mmio; - Io_mem_dataspace_capability _ds; - void *_local_addr; + static void *_with_sub_page_offset(void *local, addr_t io_base) + { + return (void *)((addr_t)local | (io_base & (addr_t)0xfff)); + } public: @@ -65,30 +64,8 @@ class Genode::Attached_io_mem_dataspace _env_rm(env.rm()), _mmio(env, base, size, write_combined), _ds(_mmio.dataspace()), - _local_addr(env.rm().attach(_ds)) - { - /* apply sub-page offset to virtual address */ - _local_addr = (void *)((addr_t)_local_addr | (base & (addr_t)0xfff)); - } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Attached_io_mem_dataspace(Genode::addr_t base, Genode::size_t size, - bool write_combined = false) __attribute__((deprecated)) - : - _env_rm(*env_deprecated()->rm_session()), - _mmio(false, base, size, write_combined), - _ds(_mmio.dataspace()), - _local_addr(_env_rm.attach(_ds)) - { - /* apply sub-page offset to virtual address */ - _local_addr = (void *)((addr_t)_local_addr | (base & (addr_t)0xfff)); - } + _local_addr(_with_sub_page_offset(env.rm().attach(_ds), base)) + { } /** * Destructor diff --git a/repos/base/include/base/attached_ram_dataspace.h b/repos/base/include/base/attached_ram_dataspace.h index 851458df8..ec3125d5e 100644 --- a/repos/base/include/base/attached_ram_dataspace.h +++ b/repos/base/include/base/attached_ram_dataspace.h @@ -107,21 +107,6 @@ class Genode::Attached_ram_dataspace _alloc_and_attach(); } - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with the 'Ram_allocator &' and - * 'Region_map &' arguments instead. - */ - Attached_ram_dataspace(Ram_allocator *ram, size_t size, - Cache_attribute cached = CACHED) __attribute__((deprecated)) - : - _size(size), _ram(ram), _rm(env_deprecated()->rm_session()), _cached(cached) - { - _alloc_and_attach(); - } - /** * Destructor */ diff --git a/repos/base/include/base/attached_rom_dataspace.h b/repos/base/include/base/attached_rom_dataspace.h index b16f7b45e..ffa51a844 100644 --- a/repos/base/include/base/attached_rom_dataspace.h +++ b/repos/base/include/base/attached_rom_dataspace.h @@ -74,17 +74,6 @@ class Genode::Attached_rom_dataspace Attached_rom_dataspace(Env &env, char const *name) : _rm(env.rm()), _rom(env, name) { _try_attach(); } - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Attached_rom_dataspace(char const *name) __attribute__((deprecated)) - : _rm(*env_deprecated()->rm_session()), _rom(false /* deprecated */, name) - { _try_attach(); } - /** * Return capability of the used dataspace */ @@ -129,14 +118,6 @@ class Genode::Attached_rom_dataspace */ bool valid() const { return _ds.constructed(); } - /** - * Return true of content is present - * - * \noapi - * \deprecated use 'valid' instead - */ - bool is_valid() const { return valid(); } - /** * Return dataspace content as XML node * diff --git a/repos/base/include/base/child.h b/repos/base/include/base/child.h index 110de9abd..9f6ea76f3 100644 --- a/repos/base/include/base/child.h +++ b/repos/base/include/base/child.h @@ -26,7 +26,6 @@ #include #include #include -#include #include namespace Genode { @@ -66,20 +65,6 @@ struct Genode::Child_policy */ virtual Linker_name linker_name() const { return "ld.lib.so"; } - /** - * Determine service to provide a session request - * - * \return service to be contacted for the new session - * \deprecated - * - * \throw Service_denied - */ - virtual Service &resolve_session_request(Service::Name const &, - Session_state::Args const &) - { - throw Service_denied(); - } - /** * Routing destination of a session request */ @@ -98,11 +83,7 @@ struct Genode::Child_policy * \throw Service_denied */ virtual Route resolve_session_request(Service::Name const &, - Session_label const &) - { - /* \deprecated make pure virtual once the old version is gone */ - throw Service_denied(); - } + Session_label const &) = 0; /** * Apply transformations to session arguments @@ -336,9 +317,6 @@ class Genode::Child : protected Rpc_object, typedef Session_state::Args Args; - static Child_policy::Route _resolve_session_request(Child_policy &, - Service::Name const &, - char const *); /* * Members that are initialized not before the child's environment is * complete. @@ -381,7 +359,7 @@ class Genode::Child : protected Rpc_object, */ Loaded_executable(Type type, Dataspace_capability ldso_ds, - Ram_session &ram, + Ram_allocator &ram, Region_map &local_rm, Region_map &remote_rm, Parent_capability parent_cap); @@ -512,7 +490,7 @@ class Genode::Child : protected Rpc_object, /** * Service (Ram_transfer::Account) interface */ - void transfer(Ram_session_capability to, Ram_quota amount) override + void transfer(Pd_session_capability to, Ram_quota amount) override { Ram_transfer::Account &from = _service; from.transfer(to, amount); @@ -521,7 +499,7 @@ class Genode::Child : protected Rpc_object, /** * Service (Ram_transfer::Account) interface */ - Ram_session_capability cap(Ram_quota) const override + Pd_session_capability cap(Ram_quota) const override { Ram_transfer::Account &to = _service; return to.cap(Ram_quota()); @@ -596,9 +574,8 @@ class Genode::Child : protected Rpc_object, try { Child_policy::Route const route = - _child._resolve_session_request(_child._policy, - _service_name(), - _args.string()); + _child._policy.resolve_session_request(_service_name(), + label_from_args(_args.string())); _env_service.construct(_child, route.service); _connection.construct(*_env_service, _child._id_space, _client_id, _args, _child._policy.filter_session_affinity(Affinity()), @@ -772,16 +749,15 @@ class Genode::Child : protected Rpc_object, return _effective_quota(quota, env_cap_quota()); } - Ram_session_capability ram_session_cap() const { return _pd.cap(); } - Pd_session_capability pd_session_cap() const { return _pd.cap(); } + Pd_session_capability pd_session_cap() const { return _pd.cap(); } Parent_capability parent_cap() const { return cap(); } - Ram_session &ram() { return _pd.session(); } - Ram_session const &ram() const { return _pd.session(); } - Cpu_session &cpu() { return _cpu.session(); } - Pd_session &pd() { return _pd .session(); } - Pd_session const &pd() const { return _pd .session(); } + Ram_allocator &ram() { return _pd.session(); } + Ram_allocator const &ram() const { return _pd.session(); } + Cpu_session &cpu() { return _cpu.session(); } + Pd_session &pd() { return _pd.session(); } + Pd_session const &pd() const { return _pd.session(); } /** * Request factory for creating session-state objects diff --git a/repos/base/include/base/connection.h b/repos/base/include/base/connection.h index 58f1c663e..8155d6b38 100644 --- a/repos/base/include/base/connection.h +++ b/repos/base/include/base/connection.h @@ -131,15 +131,6 @@ class Genode::Connection : public Connection_base Connection_base(env), _cap(_request_cap()) { } - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection(Capability) : _cap(_request_cap()) { } - /** * Destructor */ @@ -175,37 +166,6 @@ class Genode::Connection : public Connection_base _session(parent, affinity, format_args, list); return Capability(); } - - /** - * Shortcut for env()->parent()->session() - * - * \noapi - * \deprecated to be removed along with Genode::env() - */ - Capability session(const char *format_args, ...) - { - va_list list; - va_start(list, format_args); - - _session(*env_deprecated()->parent(), Affinity(), format_args, list); - return Capability(); - } - - /** - * Shortcut for env()->parent()->session() - * - * \noapi - * \deprecated to be removed along with Genode::env() - */ - Capability session(Affinity const &affinity, - char const *format_args, ...) - { - va_list list; - va_start(list, format_args); - - _session(affinity, format_args, list); - return Capability(); - } }; #endif /* _INCLUDE__BASE__CONNECTION_H_ */ diff --git a/repos/base/include/base/env.h b/repos/base/include/base/env.h index f1c2a050a..d07f05d9c 100644 --- a/repos/base/include/base/env.h +++ b/repos/base/include/base/env.h @@ -16,14 +16,8 @@ #include #include -#include #include #include -#include - -/* maintain compatibility to deprecated API */ -#include - namespace Genode { struct Env; } @@ -32,14 +26,6 @@ struct Genode::Env : Interface { virtual Parent &parent() = 0; - /** - * RAM allocator of the component - * - * The RAM allocator is backed with the RAM budget of the component's PD - * session. This budget can be used to allocate RAM dataspaces. - */ - virtual Ram_session &ram() { return pd(); } - /** * CPU session of the component * @@ -57,19 +43,16 @@ struct Genode::Env : Interface */ virtual Pd_session &pd() = 0; + /** + * Memory allocator + */ + Ram_allocator &ram() { return pd(); } + /** * Entrypoint for handling RPC requests and signals */ virtual Entrypoint &ep() = 0; - /** - * Deprecated - * - * \deprecated the RAM session has become part of the PD session - * \noapi - */ - virtual Ram_session_capability ram_session_cap() { return pd_session_cap(); } - /** * Return the CPU-session capability of the component */ diff --git a/repos/base/include/base/heap.h b/repos/base/include/base/heap.h index b7e2f87e5..3bfe88b13 100644 --- a/repos/base/include/base/heap.h +++ b/repos/base/include/base/heap.h @@ -22,7 +22,7 @@ #include namespace Genode { - + class Heap; class Sliced_heap; } @@ -196,15 +196,6 @@ class Genode::Sliced_heap : public Allocator */ static constexpr size_t meta_data_size() { return sizeof(Block); } - /** - * Constructor - * - * \deprecated Use the other constructor that takes reference - * arguments - */ - Sliced_heap(Ram_allocator *ram_alloc, Region_map *region_map) - : Sliced_heap(*ram_alloc, *region_map) { } - /** * Constructor */ diff --git a/repos/base/include/base/native_capability_tpl.h b/repos/base/include/base/native_capability_tpl.h deleted file mode 100644 index c8060536d..000000000 --- a/repos/base/include/base/native_capability_tpl.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * \brief Native capability template. - * \author Stefan Kalkowski - * \date 2011-03-07 - * - * This file is a generic variant of the Native_capability, which is - * suitable many platforms such as Fiasco, Pistachio, OKL4, Linux, - * and some more. - */ - -/* - * Copyright (C) 2012-2017 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. - */ - -#ifndef _INCLUDE__BASE__NATIVE_CAPABILITY_TPL_H_ -#define _INCLUDE__BASE__NATIVE_CAPABILITY_TPL_H_ - -namespace Genode { template class Native_capability_tpl; } - - -/** - * Generic parts of the platform-specific 'Native_capability' - * - * \param POLICY policy class that provides the type used as capability - * destination and functions for checking the validity of - * the platform-specific destination type and for - * invalid destinations. - * - * The struct passed as 'POLICY' argument must have the following - * interface: - * - * ! typedef Dst; - * ! static bool valid(Dst dst); - * ! static Dst invalid(); - * - * The 'Dst' type is the platform-specific destination type (e.g., the ID - * of the destination thread targeted by the capability). The 'valid' - * method returns true if the specified destination is valid. The - * 'invalid' method produces an invalid destination. - */ -template -class Genode::Native_capability_tpl -{ - public: - - typedef typename POLICY::Dst Dst; - - /** - * Compound object used to copy raw capability members - * - * This type is a utility solely used to communicate the - * information about the parent capability from the parent to the - * new process. - */ - struct Raw { Dst dst; long local_name; }; - - private: - - Dst _dst; - long _local_name; - - protected: - - /** - * Constructor for a local capability - * - * A local capability just encapsulates a pointer to some - * local object. This constructor is only used by a factory - * method for local-capabilities in the generic Capability - * class. - * - * \param ptr address of the local object - */ - Native_capability_tpl(void* ptr) - : _dst(POLICY::invalid()), _local_name((long)ptr) { } - - public: - - /** - * Constructor for an invalid capability - */ - Native_capability_tpl() : _dst(POLICY::invalid()), _local_name(0) { } - - /** - * Publicly available constructor - * - * \param tid kernel-specific thread id - * \param local_name ID used as key to lookup the 'Rpc_object' - * that corresponds to the capability. - */ - Native_capability_tpl(Dst tid, long local_name) - : _dst(tid), _local_name(local_name) { } - - /** - * Return true when the capability is valid - */ - bool valid() const { return POLICY::valid(_dst); } - - /** - * Return ID used to lookup the 'Rpc_object' by its capability - */ - long local_name() const { return _local_name; } - - /** - * Return pointer to object referenced by a local-capability - */ - void* local() const { return (void*)_local_name; } - - /** - * Return capability destination - */ - Dst dst() const { return _dst; } - - /** - * Return raw data representation of the capability - */ - Raw raw() const { return { _dst, _local_name }; } -}; - -#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_TPL_H_ */ diff --git a/repos/base/include/base/printf.h b/repos/base/include/base/printf.h deleted file mode 100644 index c05ee4ac1..000000000 --- a/repos/base/include/base/printf.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * \brief Interface of the printf back end - * \author Norman Feske - * \date 2006-04-08 - */ - -/* - * Copyright (C) 2006-2017 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. - */ - -#ifndef _INCLUDE__BASE__PRINTF_H_ -#define _INCLUDE__BASE__PRINTF_H_ - -#include - -namespace Genode { - - /** - * Output format string to LOG session - */ - void printf(const char *format, ...) __attribute__((format(printf, 1, 2))); - - void vprintf(const char *format, va_list) __attribute__((format(printf, 1, 0))); -} - -#define ESC_LOG "\033[33m" -#define ESC_DBG "\033[33m" -#define ESC_INF "\033[32m" -#define ESC_WRN "\033[34m" -#define ESC_ERR "\033[31m" -#define ESC_END "\033[0m" - -/** - * Remove colored output from release version - */ -#ifdef GENODE_RELEASE -#undef ESC_LOG -#undef ESC_DBG -#undef ESC_INF -#undef ESC_WRN -#undef ESC_ERR -#undef ESC_END -#define ESC_LOG -#define ESC_DBG -#define ESC_INF -#define ESC_WRN -#define ESC_ERR -#define ESC_END -#endif /* GENODE_RELEASE */ - -/** - * Suppress debug messages in release version - */ -#ifdef GENODE_RELEASE -#define DO_PWRN false -#else -#define DO_PWRN true -#endif /* GENODE_RELEASE */ - -/** - * Print log message - */ -#define PLOG(fmt, ...) \ - Genode::printf(ESC_LOG fmt ESC_END "\n", ##__VA_ARGS__ ) - -/** - * Print status-information message - */ -#define PINF(fmt, ...) \ - Genode::printf(ESC_INF fmt ESC_END "\n", ##__VA_ARGS__ ) - -/** - * Print warning message - */ -#define PWRN(fmt, ...) \ - do { \ - if (DO_PWRN) \ - Genode::printf(ESC_WRN fmt ESC_END "\n", ##__VA_ARGS__ ); \ - } while (0) - -/** - * Print error message - */ -#define PERR(fmt, ...) \ - Genode::printf(ESC_ERR fmt ESC_END "\n", ##__VA_ARGS__ ) - -#endif /* _INCLUDE__BASE__PRINTF_H_ */ diff --git a/repos/base/include/base/quota_transfer.h b/repos/base/include/base/quota_transfer.h index eb511af33..283295594 100644 --- a/repos/base/include/base/quota_transfer.h +++ b/repos/base/include/base/quota_transfer.h @@ -15,15 +15,14 @@ #define _INCLUDE__BASE__QUOTA_TRANSFER_H_ #include -#include #include namespace Genode { template class Quota_transfer; - typedef Quota_transfer Ram_transfer; - typedef Quota_transfer Cap_transfer; + typedef Quota_transfer Ram_transfer; + typedef Quota_transfer Cap_transfer; } diff --git a/repos/base/include/base/rpc_args.h b/repos/base/include/base/rpc_args.h index 16d1520c0..3a9b5670d 100644 --- a/repos/base/include/base/rpc_args.h +++ b/repos/base/include/base/rpc_args.h @@ -110,14 +110,6 @@ class Genode::Rpc_in_buffer : public Rpc_in_buffer_base bool valid_string() const { return (_size <= MAX_SIZE) && (_size > 0) && (_base[_size - 1] == '\0'); } - /** - * Return true if buffer contains a valid null-terminated string - * - * \noapi - * \deprecated use valid_string instead - */ - bool is_valid_string() const { return valid_string(); } - /** * Return buffer content as null-terminated string * diff --git a/repos/base/include/base/rpc_client.h b/repos/base/include/base/rpc_client.h index 1054c115c..7cd9fb34e 100644 --- a/repos/base/include/base/rpc_client.h +++ b/repos/base/include/base/rpc_client.h @@ -198,13 +198,6 @@ class Genode::Rpc_client : public RPC_INTERFACE return _cap.template call(args...); } - /** - * Return RPC capablity for client object - * - * \deprecated use 'rpc_cap' accessor instead - */ - operator Capability() const { return _cap; } - Capability rpc_cap() const { return _cap; } }; diff --git a/repos/base/include/base/service.h b/repos/base/include/base/service.h index abe9cf565..74d0f1f85 100644 --- a/repos/base/include/base/service.h +++ b/repos/base/include/base/service.h @@ -226,7 +226,6 @@ class Genode::Local_service : public Service break; } } - }; @@ -237,10 +236,6 @@ class Genode::Parent_service : public Service { private: - /* - * \deprecated - */ - Env &_env_deprecated(); Env &_env; public: @@ -251,14 +246,6 @@ class Genode::Parent_service : public Service Parent_service(Env &env, Service::Name const &name) : Service(name), _env(env) { } - /** - * Constructor - * - * \deprecated - */ - Parent_service(Service::Name const &name) - : Service(name), _env(_env_deprecated()) { } - void initiate_request(Session_state &session) override { switch (session.phase) { @@ -430,7 +417,7 @@ class Genode::Child_service : public Async_service /** * Ram_transfer::Account interface */ - void transfer(Ram_session_capability to, Ram_quota amount) override + void transfer(Pd_session_capability to, Ram_quota amount) override { if (to.valid()) _pd.transfer_quota(to, amount); } @@ -438,7 +425,7 @@ class Genode::Child_service : public Async_service /** * Ram_transfer::Account interface */ - Pd_session_capability cap(Ram_quota) const override { return _pd; } + Pd_session_capability cap(Ram_quota) const override { return _pd.rpc_cap(); } /** * Cap_transfer::Account interface @@ -451,7 +438,7 @@ class Genode::Child_service : public Async_service /** * Cap_transfer::Account interface */ - Pd_session_capability cap(Cap_quota) const override { return _pd; } + Pd_session_capability cap(Cap_quota) const override { return _pd.rpc_cap(); } }; #endif /* _INCLUDE__BASE__SERVICE_H_ */ diff --git a/repos/base/include/base/session_state.h b/repos/base/include/base/session_state.h index 1281a1f41..6fee23d61 100644 --- a/repos/base/include/base/session_state.h +++ b/repos/base/include/base/session_state.h @@ -143,7 +143,7 @@ class Genode::Session_state : public Parent::Client, public Parent::Server ~Session_state() { - if (id_at_parent.is_constructed()) + if (id_at_parent.constructed()) error("dangling session in parent-side ID space: ", *this); } diff --git a/repos/base/include/base/signal.h b/repos/base/include/base/signal.h index 25703bd63..f3c657f57 100644 --- a/repos/base/include/base/signal.h +++ b/repos/base/include/base/signal.h @@ -38,8 +38,6 @@ namespace Genode { class Signal; class Signal_dispatcher_base; - template class Signal_dispatcher; - template class Io_signal_dispatcher; template class Signal_handler; template class Io_signal_handler; @@ -151,13 +149,11 @@ class Genode::Signal_transmitter */ void context(Signal_context_capability context); - /** * Return signal context */ Signal_context_capability context(); - /** * Trigger signal submission to context * @@ -258,18 +254,6 @@ class Genode::Signal_context : Interface, Noncopyable List_element *deferred_le() { return &_deferred_le; } - /** - * Local signal submission (DEPRECATED) - * - * \noapi - * - * Trigger local signal submission (within the same address space), the - * context has to be bound to a sginal receiver beforehand. - * - * \param num number of pending signals - */ - void submit(unsigned num); - /* * Signal contexts are never invoked but only used as arguments for * 'Signal_session' methods. Hence, there exists a capability @@ -453,67 +437,6 @@ struct Genode::Signal_dispatcher_base : Signal_context }; -/** - * Adapter for directing signals to object methods - * - * This utility associates object methods with signals. It is intended to - * be used as a member variable of the class that handles incoming signals - * of a certain type. The constructor takes a pointer-to-member to the - * signal handling method as argument. If a signal is received at the - * common signal reception code, this method will be invoked by calling - * 'Signal_dispatcher_base::dispatch'. - * - * \param T type of signal-handling class - */ -template -class Genode::Signal_dispatcher : public Signal_dispatcher_base -{ - private: - - Signal_context_capability _cap; - T &obj; - void (T::*member) (unsigned); - Signal_receiver &sig_rec; - - public: - - /** - * Constructor - * - * \param sig_rec signal receiver to associate the signal - * handler with - * \param obj,member object and method to call when - * the signal occurs - */ - Signal_dispatcher(Signal_receiver &sig_rec, - T &obj, void (T::*member)(unsigned)) - : - _cap(sig_rec.manage(this)), - obj(obj), member(member), - sig_rec(sig_rec) - { } - - ~Signal_dispatcher() { sig_rec.dissolve(this); } - - void dispatch(unsigned num) override { (obj.*member)(num); } - - operator Capability() const { return _cap; } -}; - - -/** - * Signal dispatcher for I/O-level signals - */ -template -struct Genode::Io_signal_dispatcher : Signal_dispatcher -{ - Io_signal_dispatcher(Signal_receiver &sig_rec, - T &obj, void (T::*member)(unsigned)) - : Signal_dispatcher(sig_rec, obj, member) - { Signal_context::_level = Signal_context::Level::Io; } -}; - - /** * Signal dispatcher for handling signals by an object method * diff --git a/repos/base/include/base/slab.h b/repos/base/include/base/slab.h index 9aaa8e197..e2beffb5c 100644 --- a/repos/base/include/base/slab.h +++ b/repos/base/include/base/slab.h @@ -19,17 +19,7 @@ namespace Genode { class Slab; } -/** - * Transitional type definition, for API compatibility only - * - * \deprecated To be removed once all Slab users are updated. - */ -namespace Genode { typedef void Slab_block; } - -/** - * Slab allocator - */ class Genode::Slab : public Allocator { private: @@ -52,7 +42,7 @@ class Genode::Slab : public Allocator */ Block *_curr_sb = nullptr; - Allocator *_backing_store; + Allocator *_backing_store; /** * Allocate and initialize new slab block diff --git a/repos/base/include/base/thread.h b/repos/base/include/base/thread.h index 77e8b0223..f59d6be93 100644 --- a/repos/base/include/base/thread.h +++ b/repos/base/include/base/thread.h @@ -20,7 +20,6 @@ #include #include #include -#include /* for 'Ram_dataspace_capability' type */ #include /* for 'Thread_capability' type */ namespace Genode { diff --git a/repos/base/include/base/thread_state.h b/repos/base/include/base/thread_state.h index 360b298fa..2c1da93bc 100644 --- a/repos/base/include/base/thread_state.h +++ b/repos/base/include/base/thread_state.h @@ -2,9 +2,6 @@ * \brief Thread state * \author Norman Feske * \date 2007-07-30 - * - * This file provides a generic implementation of the 'Thread state' class. - * Base platforms can provide their own version of this file. */ /* @@ -17,14 +14,17 @@ #ifndef _INCLUDE__BASE__THREAD_STATE_H_ #define _INCLUDE__BASE__THREAD_STATE_H_ -#include +#include namespace Genode { struct Thread_state; } -struct Genode::Thread_state : Thread_state_base +struct Genode::Thread_state : Cpu_state { - Thread_state() {} - Thread_state(Thread_state_base &base) : Thread_state_base(base) {} + bool unresolved_page_fault = false; + bool exception = false; + + Thread_state() { }; + Thread_state(Cpu_state &c) : Cpu_state(c) { }; }; #endif /* _INCLUDE__BASE__THREAD_STATE_H_ */ diff --git a/repos/base/include/base/thread_state_base.h b/repos/base/include/base/thread_state_base.h deleted file mode 100644 index 0e584e335..000000000 --- a/repos/base/include/base/thread_state_base.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * \brief Thread state base class - * \author Norman Feske - * \date 2007-07-30 - * - * This file contains the generic part of the thread state. - */ - -/* - * Copyright (C) 2007-2017 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. - */ - -#ifndef _INCLUDE__BASE__THREAD_STATE_BASE_H_ -#define _INCLUDE__BASE__THREAD_STATE_BASE_H_ - -#include - -namespace Genode { struct Thread_state_base; } - -struct Genode::Thread_state_base : Cpu_state -{ - bool unresolved_page_fault = false; - bool exception = false; - - Thread_state_base() { }; - Thread_state_base(Cpu_state &c) : Cpu_state(c) { }; -}; - -#endif /* _INCLUDE__BASE__THREAD_STATE_BASE_H_ */ diff --git a/repos/base/include/base/trace/buffer.h b/repos/base/include/base/trace/buffer.h index 9d0daf5c7..ae7772763 100644 --- a/repos/base/include/base/trace/buffer.h +++ b/repos/base/include/base/trace/buffer.h @@ -155,11 +155,6 @@ class Genode::Trace::Buffer * +--------------------------+------------+-------------+---+---------------------+ */ bool last() const { return _entry == 0; } - - /* - * \deprecated use 'last' instead - */ - bool is_last() const { return last(); } }; Entry first() const diff --git a/repos/base/include/base/weak_ptr.h b/repos/base/include/base/weak_ptr.h index 52bbbd798..a837793c0 100644 --- a/repos/base/include/base/weak_ptr.h +++ b/repos/base/include/base/weak_ptr.h @@ -351,14 +351,6 @@ struct Genode::Locked_ptr : Genode::Locked_ptr_base * the attempt will result in a null-pointer access. */ bool valid() const { return curr != nullptr; } - - /** - * Returns true if the locked pointer is valid - * - * \noapi - * \deprecated use 'valid' instead - */ - bool is_valid() const { return valid(); } }; diff --git a/repos/base/include/cap_session/cap_session.h b/repos/base/include/cap_session/cap_session.h deleted file mode 100644 index 1dad55719..000000000 --- a/repos/base/include/cap_session/cap_session.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * \brief CAP-session interface - * \author Norman Feske - * \date 2006-06-23 - * - * \deprecated - * - * This header is scheduled for removal. It exists for API compatiblity only. - */ - -#ifndef INCLUDED_BY_ENTRYPOINT_CC -#warning cap_session/cap_session.h is deprecated -#endif - -/* - * Copyright (C) 2006-2017 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. - */ - -#ifndef _INCLUDE__CAP_SESSION__CAP_SESSION_H_ -#define _INCLUDE__CAP_SESSION__CAP_SESSION_H_ - -#include - -namespace Genode { typedef Pd_session Cap_session; } - -#endif /* _INCLUDE__CAP_SESSION__CAP_SESSION_H_ */ diff --git a/repos/base/include/cap_session/connection.h b/repos/base/include/cap_session/connection.h deleted file mode 100644 index 51aa9649a..000000000 --- a/repos/base/include/cap_session/connection.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * \brief Connection to CAP service - * \author Norman Feske - * \date 2008-08-22 - * - * \deprecated - * - * This header is scheduled for removal. It exists for API compatiblity only. - */ - -/* - * Copyright (C) 2008-2017 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. - */ - -#ifndef _INCLUDE__CAP_SESSION__CONNECTION_H_ -#define _INCLUDE__CAP_SESSION__CONNECTION_H_ - -#include -#include -#include - -namespace Genode { struct Cap_connection; } - -#ifndef INCLUDED_BY_ENTRYPOINT_CC -#warning cap_session.h is deprecated -#endif - - -/* - * There are no CAP connections anymore. The only situation where CAP - * connections were created was inside old-fashioned servers that used - * to create an 'Rpc_entrypoint' manually. The 'Rpc_entrypoint' requires - * a CAP session as constructor argument. We accommodate this use case - * by allocating RPC capabilities from the server's protection domain. - * - * Modern components no longer create 'Rpc_entrypoint' objects directly - * but instead use the new 'Entrypoint' interface. - */ -struct Genode::Cap_connection : Pd_session_client -{ - Cap_connection() : Pd_session_client(env_deprecated()->pd_session_cap()) { } -} __attribute__((deprecated)); - -#endif /* _INCLUDE__CAP_SESSION__CONNECTION_H_ */ diff --git a/repos/base/include/cpu_session/connection.h b/repos/base/include/cpu_session/connection.h index 9ba897642..8a2af3536 100644 --- a/repos/base/include/cpu_session/connection.h +++ b/repos/base/include/cpu_session/connection.h @@ -24,19 +24,6 @@ struct Genode::Cpu_connection : Connection, Cpu_session_client { enum { RAM_QUOTA = 36*1024 }; - /** - * Issue session request - * - * \noapi - */ - Capability _session(Parent &parent, char const *label, - long priority, Affinity const &affinity) - { - return session(parent, affinity, - "priority=0x%lx, ram_quota=128K, cap_quota=%u, label=\"%s\"", - priority, CAP_QUOTA, label); - } - /** * Constructor * @@ -47,21 +34,11 @@ struct Genode::Cpu_connection : Connection, Cpu_session_client Cpu_connection(Env &env, const char *label = "", long priority = DEFAULT_PRIORITY, Affinity const &affinity = Affinity()) : - Connection(env, _session(env.parent(), label, priority, affinity)), - Cpu_session_client(cap()) - { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Cpu_connection(const char *label = "", long priority = DEFAULT_PRIORITY, - Affinity const &affinity = Affinity()) __attribute__((deprecated)) - : - Connection(_session(*env_deprecated()->parent(), label, priority, affinity)), + Connection(env, + session(env.parent(), affinity, + "priority=0x%lx, ram_quota=%u, " + "cap_quota=%u, label=\"%s\"", + priority, RAM_QUOTA, CAP_QUOTA, label)), Cpu_session_client(cap()) { } }; diff --git a/repos/base/include/cpu_session/cpu_session.h b/repos/base/include/cpu_session/cpu_session.h index aff047bbe..63f61bfb8 100644 --- a/repos/base/include/cpu_session/cpu_session.h +++ b/repos/base/include/cpu_session/cpu_session.h @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -27,6 +26,8 @@ namespace Genode { struct Cpu_session; struct Cpu_session_client; + + typedef Capability Thread_capability; } diff --git a/repos/base/include/cpu_thread/capability.h b/repos/base/include/cpu_thread/capability.h deleted file mode 100644 index 36e55a81f..000000000 --- a/repos/base/include/cpu_thread/capability.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * \brief Thread capability type - * \author Norman Feske - * \date 2016-05-11 - */ - -/* - * Copyright (C) 2016-2017 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. - */ - -#ifndef _INCLUDE__CPU_THREAD__CAPABILITY_H_ -#define _INCLUDE__CPU_THREAD__CAPABILITY_H_ - -#include -#include - -namespace Genode { typedef Capability Cpu_thread_capability; } - -#endif /* _INCLUDE__CPU_THREAD__CAPABILITY_H_ */ diff --git a/repos/base/include/deprecated/env.h b/repos/base/include/deprecated/env.h index f9a4bd067..e63eac823 100644 --- a/repos/base/include/deprecated/env.h +++ b/repos/base/include/deprecated/env.h @@ -20,8 +20,6 @@ #include #include #include -#include /* deprecated, kept for API compatibility only */ -#include #include #include #include @@ -68,16 +66,6 @@ struct Genode::Env_deprecated : Interface */ virtual Parent *parent() = 0; - /** - * RAM session of the component - * - * The RAM Session represents a budget of memory (quota) that is - * available to the component. This budget can be used to allocate - * RAM dataspaces. - */ - virtual Ram_session *ram_session() { return pd_session(); } - virtual Ram_session_capability ram_session_cap() { return pd_session_cap(); } - /** * CPU session of the component * @@ -101,11 +89,6 @@ struct Genode::Env_deprecated : Interface virtual Pd_session *pd_session() = 0; virtual Pd_session_capability pd_session_cap() = 0; - /** - * Heap backed by the RAM session of the environment - */ - virtual Allocator *heap() = 0; - /** * Reload parent capability and reinitialize environment resources * diff --git a/repos/base/include/io_mem_session/connection.h b/repos/base/include/io_mem_session/connection.h index 0f02ac5c5..f6e32581b 100644 --- a/repos/base/include/io_mem_session/connection.h +++ b/repos/base/include/io_mem_session/connection.h @@ -22,18 +22,6 @@ namespace Genode { struct Io_mem_connection; } struct Genode::Io_mem_connection : Connection, Io_mem_session_client { - /** - * Issue session request - * - * \noapi - */ - Capability _session(Parent &, addr_t base, size_t size, - bool write_combined) - { - return session("cap_quota=%u, ram_quota=6K, base=0x%p, size=0x%lx, wc=%s", - CAP_QUOTA, base, size, write_combined ? "yes" : "no"); - } - /** * Constructor * @@ -43,36 +31,12 @@ struct Genode::Io_mem_connection : Connection, Io_mem_session_cl */ Io_mem_connection(Env &env, addr_t base, size_t size, bool write_combined = false) : - Connection(env, _session(env.parent(), base, size, write_combined)), - Io_mem_session_client(cap()) - { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Io_mem_connection(addr_t base, size_t size, bool write_combined = false) __attribute__((deprecated)) - : - Connection(_session(*env_deprecated()->parent(), base, size, write_combined)), - Io_mem_session_client(cap()) - { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - * - * This variant is solely meant to be called from deprecated functions. - * It will be removed along with these functions. - */ - Io_mem_connection(bool, addr_t base, size_t size, bool write_combined = false) - : - Connection(_session(*env_deprecated()->parent(), base, size, write_combined)), + Connection(env, + session(env.parent(), + "cap_quota=%u, ram_quota=6K, " + "base=0x%p, size=0x%lx, wc=%s", + CAP_QUOTA, base, size, + write_combined ? "yes" : "no")), Io_mem_session_client(cap()) { } }; diff --git a/repos/base/include/io_port_session/connection.h b/repos/base/include/io_port_session/connection.h index 357b8edeb..13e226608 100644 --- a/repos/base/include/io_port_session/connection.h +++ b/repos/base/include/io_port_session/connection.h @@ -42,20 +42,11 @@ struct Genode::Io_port_connection : Connection, */ Io_port_connection(Env &env, unsigned base, unsigned size) : - Connection(env, _session(env.parent(), base, size)), - Io_port_session_client(cap()) - { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Io_port_connection(unsigned base, unsigned size) __attribute__((deprecated)) - : - Connection(_session(*env_deprecated()->parent(), base, size)), + Connection(env, + session(env.parent(), + "ram_quota=6K, cap_quota=%u, " + "io_port_base=%u, io_port_size=%u", + CAP_QUOTA, base, size)), Io_port_session_client(cap()) { } }; diff --git a/repos/base/include/irq_session/connection.h b/repos/base/include/irq_session/connection.h index 684fa3743..35e4762fc 100644 --- a/repos/base/include/irq_session/connection.h +++ b/repos/base/include/irq_session/connection.h @@ -21,22 +21,6 @@ namespace Genode { struct Irq_connection; } struct Genode::Irq_connection : Connection, Irq_session_client { - /** - * Issue session request - * - * \noapi - */ - Capability _session(Parent &, - unsigned irq, - Irq_session::Trigger trigger, - Irq_session::Polarity polarity, - Genode::addr_t device_config_phys) - { - return session("ram_quota=6K, cap_quota=4, irq_number=%u, irq_trigger=%u, " - " irq_polarity=%u, device_config_phys=0x%lx", - irq, trigger, polarity, device_config_phys); - } - /** * Constructor * @@ -50,25 +34,11 @@ struct Genode::Irq_connection : Connection, Irq_session_client Irq_session::Polarity polarity = Irq_session::POLARITY_UNCHANGED, Genode::addr_t device_config_phys = 0) : - Connection(env, _session(env.parent(), irq, trigger, - polarity, device_config_phys)), - Irq_session_client(cap()) - { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Irq_connection(unsigned irq, - Irq_session::Trigger trigger = Irq_session::TRIGGER_UNCHANGED, - Irq_session::Polarity polarity = Irq_session::POLARITY_UNCHANGED, - Genode::addr_t device_config_phys = 0) __attribute__((deprecated)) - : - Connection(_session(*Genode::env_deprecated()->parent(), irq, - trigger, polarity, device_config_phys)), + Connection(env, session(env.parent(), + "ram_quota=6K, cap_quota=4, " + "irq_number=%u, irq_trigger=%u, " + "irq_polarity=%u, device_config_phys=0x%lx", + irq, trigger, polarity, device_config_phys)), Irq_session_client(cap()) { } }; diff --git a/repos/base/include/log_session/connection.h b/repos/base/include/log_session/connection.h index dcc8daf53..330e92ddb 100644 --- a/repos/base/include/log_session/connection.h +++ b/repos/base/include/log_session/connection.h @@ -35,20 +35,6 @@ struct Genode::Log_connection : Connection, Log_session_client RAM_QUOTA, CAP_QUOTA, label.string())), Log_session_client(cap()) { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Log_connection(Session_label label = Session_label()) __attribute__((deprecated)) - : - Connection(session("ram_quota=%ld, cap_quota=%ld, label=\"%s\"", - RAM_QUOTA, CAP_QUOTA, label.string())), - Log_session_client(cap()) - { } }; #endif /* _INCLUDE__LOG_SESSION__CONNECTION_H_ */ diff --git a/repos/base/include/pd_session/client.h b/repos/base/include/pd_session/client.h index 9492c62e3..11908c3f0 100644 --- a/repos/base/include/pd_session/client.h +++ b/repos/base/include/pd_session/client.h @@ -86,8 +86,8 @@ struct Genode::Pd_session_client : Rpc_client return ds.valid() ? Dataspace_client(ds).size() : 0; } - void transfer_quota(Pd_session_capability ram_session, Ram_quota amount) override { - call(ram_session, amount); } + void transfer_quota(Pd_session_capability pd_session, Ram_quota amount) override { + call(pd_session, amount); } Ram_quota ram_quota() const override { return call(); } Ram_quota used_ram() const override { return call(); } diff --git a/repos/base/include/pd_session/connection.h b/repos/base/include/pd_session/connection.h index db1e05a11..eab34bee9 100644 --- a/repos/base/include/pd_session/connection.h +++ b/repos/base/include/pd_session/connection.h @@ -37,19 +37,6 @@ struct Genode::Pd_connection : Connection, Pd_session_client RAM_QUOTA, CAP_QUOTA, label, space)), Pd_session_client(cap()) { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Pd_connection(char const *label = "") __attribute__((deprecated)) - : - Connection(session("ram_quota=%u, label=\"%s\"", RAM_QUOTA, label)), - Pd_session_client(cap()) - { } }; #endif /* _INCLUDE__PD_SESSION__CONNECTION_H_ */ diff --git a/repos/base/include/pd_session/pd_session.h b/repos/base/include/pd_session/pd_session.h index 380e37bd8..8b5edbe06 100644 --- a/repos/base/include/pd_session/pd_session.h +++ b/repos/base/include/pd_session/pd_session.h @@ -16,7 +16,6 @@ #define _INCLUDE__PD_SESSION__PD_SESSION_H_ #include -#include #include #include #include diff --git a/repos/base/include/ram_session/capability.h b/repos/base/include/ram_session/capability.h deleted file mode 100644 index 8fabc125e..000000000 --- a/repos/base/include/ram_session/capability.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * \brief RAM-session capability type - * \author Norman Feske - * \date 2008-08-16 - */ - -/* - * Copyright (C) 2008-2017 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. - */ - -#ifndef _INCLUDE__RAM_SESSION__CAPABILITY_H_ -#define _INCLUDE__RAM_SESSION__CAPABILITY_H_ - -#include - -namespace Genode { - - /* - * We cannot include 'ram_session/ram_session.h' because this file relies - * on the the 'Ram_session_capability' type. - */ - class Pd_session; - typedef Capability Ram_session_capability; -} - -#endif /* _INCLUDE__RAM_SESSION__CAPABILITY_H_ */ diff --git a/repos/base/include/ram_session/ram_session.h b/repos/base/include/ram_session/ram_session.h deleted file mode 100644 index 67fa628bf..000000000 --- a/repos/base/include/ram_session/ram_session.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * \brief RAM session interface - * \author Norman Feske - * \date 2006-05-11 - * - * \deprecated The RAM session interface is integrated in the PD session now. - */ - -/* - * Copyright (C) 2006-2017 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. - */ - -#ifndef _INCLUDE__RAM_SESSION__RAM_SESSION_H_ -#define _INCLUDE__RAM_SESSION__RAM_SESSION_H_ - -#include - -namespace Genode { typedef Pd_session Ram_session; } - -#endif /* _INCLUDE__RAM_SESSION__RAM_SESSION_H_ */ diff --git a/repos/base/include/region_map/region_map.h b/repos/base/include/region_map/region_map.h index 66798e270..201c902dc 100644 --- a/repos/base/include/region_map/region_map.h +++ b/repos/base/include/region_map/region_map.h @@ -19,7 +19,6 @@ #include #include #include -#include namespace Genode { struct Region_map; } diff --git a/repos/base/include/rm_session/connection.h b/repos/base/include/rm_session/connection.h index 78fc56748..0b6b7cf92 100644 --- a/repos/base/include/rm_session/connection.h +++ b/repos/base/include/rm_session/connection.h @@ -35,19 +35,6 @@ struct Genode::Rm_connection : Connection, Rm_session_client Rm_session_client(cap()) { } - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Rm_connection() __attribute__((deprecated)) - : - Connection(session("ram_quota=%u, cap_quota=%u", RAM_QUOTA, CAP_QUOTA)), - Rm_session_client(cap()) - { } - /** * Wrapper over 'create' that handles resource requests * from the server. diff --git a/repos/base/include/rom_session/connection.h b/repos/base/include/rom_session/connection.h index 0a07208b3..ce1b9badf 100644 --- a/repos/base/include/rom_session/connection.h +++ b/repos/base/include/rom_session/connection.h @@ -21,82 +21,32 @@ namespace Genode { class Rom_connection; } -class Genode::Rom_connection : public Connection, - public Rom_session_client +struct Genode::Rom_connection : Connection, + Rom_session_client { - public: + class Rom_connection_failed : public Service_denied { }; - class Rom_connection_failed : public Service_denied { }; + enum { RAM_QUOTA = 6*1024UL }; - enum { RAM_QUOTA = 6*1024UL }; - - private: - - Rom_session_capability _session(Parent &, char const *label) - { - return session("ram_quota=%ld, cap_quota=%ld, label=\"%s\"", - RAM_QUOTA, CAP_QUOTA, label); - } - - public: - - /** - * Constructor - * - * \param label request label and name of ROM module - * - * \throw Rom_connection_failed - */ - Rom_connection(Env &env, const char *label) - try : - Connection(env, _session(env.parent(), label)), - Rom_session_client(cap()) - { } - catch (...) { - error("Could not open ROM session for \"", label, "\""); - throw Rom_connection_failed(); - } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Rom_connection(const char *label) __attribute__((deprecated)) - try : - Connection(_session(*env_deprecated()->parent(), label)), - Rom_session_client(cap()) - { } - catch (...) { - error("Could not open ROM session for \"", label, "\""); - throw Rom_connection_failed(); - } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - * - * This version is deliberately used by functions that are marked as - * deprecated. If such a function called directly the - * __attribute__((deprecate)) version, we would always get a warning, - * even if the outer deprecated function is not called. - * - * It will be removed as soon as they are gone. - */ - Rom_connection(bool, const char *label) - try : - Connection(_session(*env_deprecated()->parent(), label)), - Rom_session_client(cap()) - { } - catch (...) { - error("Could not open ROM session for \"", label, "\""); - throw Rom_connection_failed(); - } + /** + * Constructor + * + * \param label request label and name of ROM module + * + * \throw Rom_connection_failed + */ + Rom_connection(Env &env, const char *label) + try : + Connection(env, + session(env.parent(), + "ram_quota=%ld, cap_quota=%ld, label=\"%s\"", + RAM_QUOTA, CAP_QUOTA, label)), + Rom_session_client(cap()) + { } + catch (...) { + error("Could not open ROM session for \"", label, "\""); + throw Rom_connection_failed(); + } }; #endif /* _INCLUDE__ROM_SESSION__CONNECTION_H_ */ diff --git a/repos/base/include/thread/capability.h b/repos/base/include/thread/capability.h deleted file mode 100644 index c619d1cd9..000000000 --- a/repos/base/include/thread/capability.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * \brief Thread capability type - * \author Norman Feske - * \date 2008-08-16 - * - * \deprecated Use cpu_thread/capability.h instead - */ - -/* - * Copyright (C) 2008-2017 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. - */ - -#ifndef _INCLUDE__THREAD__CAPABILITY_H_ -#define _INCLUDE__THREAD__CAPABILITY_H_ - -#include - -namespace Genode { typedef Cpu_thread_capability Thread_capability; } - -#endif /* _INCLUDE__THREAD__CAPABILITY_H_ */ diff --git a/repos/base/include/timer_session/connection.h b/repos/base/include/timer_session/connection.h index 6346efb5f..9b3201524 100644 --- a/repos/base/include/timer_session/connection.h +++ b/repos/base/include/timer_session/connection.h @@ -261,15 +261,6 @@ class Timer::Connection : public Genode::Connection, */ Connection(Genode::Env &env, char const *label = ""); - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection() __attribute__((deprecated)); - ~Connection() { _sig_rec.dissolve(&_default_sigh_ctx); } /* diff --git a/repos/base/include/trace_session/connection.h b/repos/base/include/trace_session/connection.h index 98d164b98..640fc3e04 100644 --- a/repos/base/include/trace_session/connection.h +++ b/repos/base/include/trace_session/connection.h @@ -23,21 +23,6 @@ namespace Genode { namespace Trace { struct Connection; } } struct Genode::Trace::Connection : Genode::Connection, Genode::Trace::Session_client { - /** - * Issue session request - * - * \noapi - */ - Capability _session(Parent &parent, - size_t ram_quota, - size_t arg_buffer_size, - unsigned parent_levels) - { - return session(parent, - "ram_quota=%lu, arg_buffer_size=%lu, parent_levels=%u", - ram_quota + 2048, arg_buffer_size, parent_levels); - } - /** * Constructor * @@ -47,25 +32,11 @@ struct Genode::Trace::Connection : Genode::Connection, */ Connection(Env &env, size_t ram_quota, size_t arg_buffer_size, unsigned parent_levels) : - Genode::Connection(env, _session(env.parent(), ram_quota, - arg_buffer_size, parent_levels)), + Genode::Connection(env, + session(env.parent(), "ram_quota=%lu, arg_buffer_size=%lu, parent_levels=%u", + ram_quota + 2048, arg_buffer_size, parent_levels)), Session_client(env.rm(), cap()) { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection(size_t ram_quota, size_t arg_buffer_size, unsigned parent_levels) __attribute__((deprecated)) - : - Genode::Connection(_session(*env_deprecated()->parent(), - ram_quota, arg_buffer_size, - parent_levels)), - Session_client(*env_deprecated()->rm_session(), cap()) - { } }; #endif /* _INCLUDE__TRACE_SESSION__CONNECTION_H_ */ diff --git a/repos/base/include/util/reconstructible.h b/repos/base/include/util/reconstructible.h index 1dc413e34..5385749f7 100644 --- a/repos/base/include/util/reconstructible.h +++ b/repos/base/include/util/reconstructible.h @@ -129,13 +129,6 @@ class Genode::Reconstructible : Noncopyable */ bool constructed() const { return _constructed; } - /** - * Return true of volatile object contains a constructed object - * - * \deprecated use 'constructed' instead - */ - bool is_constructed() const { return constructed(); } - /** * Construct or destruct volatile object according to 'condition' */ diff --git a/repos/base/include/util/register_set.h b/repos/base/include/util/register_set.h index 554c0814e..367162517 100644 --- a/repos/base/include/util/register_set.h +++ b/repos/base/include/util/register_set.h @@ -721,81 +721,6 @@ class Genode::Register_set : Noncopyable wait_for(Attempts(500), Microseconds(1000), delayer, conditions...); } - - /** - * Wait until register 'T' contains the specified 'value' - * - * \param value value to wait for - * \param delayer sleeping facility to be used when the - * value is not reached yet - * \param max_attempts number of register probing attempts - * \param us number of microseconds between attempts - * - * \noapi - * \deprecated use 'template wait_for' - */ - template - inline bool - wait_for(typename T::Register_base::access_t const value, - Delayer & delayer, - unsigned max_attempts = 500, - unsigned us = 1000) __attribute__ ((deprecated)); - - /** - * Wait until bitfield 'T' contains the specified 'value' - * - * \param value value to wait for - * \param delayer sleeping facility to be used when the - * value is not reached yet - * \param max_attempts number of bitfield probing attempts - * \param us number of microseconds between attempts - * - * \noapi - * \deprecated use 'template wait_for' - */ - template - inline bool - wait_for(typename T::Bitfield_base::Compound_reg::access_t const value, - Delayer & delayer, - unsigned max_attempts = 500, - unsigned us = 1000) __attribute__ ((deprecated)); }; - -template -template -bool Genode::Register_set:: -wait_for(typename T::Register_base::access_t const value, - Delayer &delayer, - unsigned max_attempts, - unsigned us) -{ - typedef typename T::Register_base Register; - for (unsigned i = 0; i < max_attempts; i++, delayer.usleep(us)) - { - if (read() == value) { - return true; } - } - return false; -} - - -template -template -bool Genode::Register_set:: -wait_for(typename T::Bitfield_base::Compound_reg::access_t const value, - Delayer &delayer, - unsigned max_attempts, - unsigned us) -{ - typedef typename T::Bitfield_base Bitfield; - for (unsigned i = 0; i < max_attempts; i++, delayer.usleep(us)) - { - if (read() == value) { - return true; } - } - return false; -} - - #endif /* _INCLUDE__UTIL__REGISTER_SET_H_ */ diff --git a/repos/base/include/util/volatile_object.h b/repos/base/include/util/volatile_object.h deleted file mode 100644 index 2367e3dad..000000000 --- a/repos/base/include/util/volatile_object.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * \brief Utility for manual in-place construction of objects - * \author Norman Feske - * \date 2014-01-10 - * - * \deprecated use 'util/reconstructible.h' instead - */ - -/* - * Copyright (C) 2014-2017 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. - */ - -#ifndef _INCLUDE__UTIL__VOLATILE_OBJECT_H_ -#define _INCLUDE__UTIL__VOLATILE_OBJECT_H_ - -#include - -#warning "'util/volatile_object.h' is deprecated, use 'util/reconstructible.h' instead (see https://github.com/genodelabs/genode/issues/2151)" - -namespace Genode { - - template - struct Volatile_object : Reconstructible - { - using Reconstructible::Reconstructible; - }; - - template - struct Lazy_volatile_object : Constructible - { - using Constructible::Constructible; - }; -} - -#endif /* _INCLUDE__UTIL__VOLATILE_OBJECT_H_ */ diff --git a/repos/base/include/vm_session/connection.h b/repos/base/include/vm_session/connection.h index 2cb26375f..4b3d2e55c 100644 --- a/repos/base/include/vm_session/connection.h +++ b/repos/base/include/vm_session/connection.h @@ -52,21 +52,6 @@ struct Genode::Vm_connection : Connection, Vm_session_client Vm_session_client(cap()) { } - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Vm_connection(const char *label = "", - long priority = Cpu_session::DEFAULT_PRIORITY, - unsigned long affinity = 0) __attribute__((deprecated)) - : - Connection(_session(*env_deprecated()->parent(), label, priority, affinity)), - Vm_session_client(cap()) - { } - template auto with_upgrade(FUNC func) -> decltype(func()) { diff --git a/repos/base/include/vm_session/vm_session.h b/repos/base/include/vm_session/vm_session.h index c8df5101d..0306f4cde 100644 --- a/repos/base/include/vm_session/vm_session.h +++ b/repos/base/include/vm_session/vm_session.h @@ -17,8 +17,9 @@ /* Genode includes */ #include #include +#include +#include #include -#include namespace Genode { struct Vm_session; } diff --git a/repos/base/src/core/include/core_env.h b/repos/base/src/core/include/core_env.h index d46500d61..4afb14e0b 100644 --- a/repos/base/src/core/include/core_env.h +++ b/repos/base/src/core/include/core_env.h @@ -94,7 +94,6 @@ class Genode::Core_env : public Env_deprecated, Noncopyable Parent *parent() override { return nullptr; } Region_map *rm_session() override { return &_region_map; } Pd_session *pd_session() override { return &_pd_session; } - Allocator *heap() override { ASSERT_NEVER_CALLED; } Cpu_session *cpu_session() override { ASSERT_NEVER_CALLED; } Cpu_session_capability cpu_session_cap() override { ASSERT_NEVER_CALLED; } Pd_session_capability pd_session_cap() override { return _pd_session.cap(); } diff --git a/repos/base/src/include/base/internal/platform_env.h b/repos/base/src/include/base/internal/platform_env.h index 44b2a7b73..e73ad86ae 100644 --- a/repos/base/src/include/base/internal/platform_env.h +++ b/repos/base/src/include/base/internal/platform_env.h @@ -113,7 +113,6 @@ class Genode::Platform_env : public Platform_env_base Pd_session *pd_session() override { return &_resources.pd; } Pd_session_capability pd_session_cap() override { return _resources.pd.rpc_cap(); } Region_map *rm_session() override { return &_resources.rm; } - Allocator *heap() override { return &_heap; } }; #endif /* _INCLUDE__BASE__INTERNAL__PLATFORM_ENV_H_ */ diff --git a/repos/base/src/lib/base/child.cc b/repos/base/src/lib/base/child.cc index a30731517..ca23775fe 100644 --- a/repos/base/src/lib/base/child.cc +++ b/repos/base/src/lib/base/child.cc @@ -135,34 +135,6 @@ create_session(Child_policy::Name const &child_name, Service &service, } -/* - * \deprecated Temporary wrapper around 'Child_policy::resolve_session_request' - * that tries both overloads. - * - * \throw Service_denied - */ -Child_policy::Route Child::_resolve_session_request(Child_policy &policy, - Service::Name const &name, - char const *argbuf) -{ - Session_label const label = label_from_args(argbuf); - - /* - * \deprecated Try old interface, remove once all 'Child_policy' - * implementations are updated. - */ - try { - - Session_state::Args args(argbuf); - return { policy.resolve_session_request(name, args), label, - session_diag_from_args(argbuf) }; - } - catch (Service_denied) { } - - return policy.resolve_session_request(name, label); -} - - Session_capability Child::session(Parent::Client::Id id, Parent::Service_name const &name, Parent::Session_args const &args, @@ -176,9 +148,9 @@ Session_capability Child::session(Parent::Client::Id id, strncpy(argbuf, args.string(), sizeof(argbuf)); /* prefix session label */ - Session_label const orig_label(label_from_args(argbuf)); - Arg_string::set_arg_string(argbuf, sizeof(argbuf), "label", - prefixed_label(_policy.name(), orig_label).string()); + Session_label const label = prefixed_label(_policy.name(), label_from_args(argbuf)); + + Arg_string::set_arg_string(argbuf, sizeof(argbuf), "label", label.string()); /* filter session arguments according to the child policy */ _policy.filter_session_args(name.string(), argbuf, sizeof(argbuf)); @@ -202,7 +174,8 @@ Session_capability Child::session(Parent::Client::Id id, Arg_string::set_arg(argbuf, sizeof(argbuf), "ram_quota", forward_ram_quota.value); /* may throw a 'Service_denied' exception */ - Child_policy::Route route = _resolve_session_request(_policy, name.string(), argbuf); + Child_policy::Route route = _policy.resolve_session_request(name.string(), label); + Service &service = route.service; /* propagate diag flag */ diff --git a/repos/base/src/lib/base/child_process.cc b/repos/base/src/lib/base/child_process.cc index 139c63a5a..4eb488879 100644 --- a/repos/base/src/lib/base/child_process.cc +++ b/repos/base/src/lib/base/child_process.cc @@ -26,7 +26,7 @@ using namespace Genode; Child::Process::Loaded_executable::Loaded_executable(Type type, Dataspace_capability ldso_ds, - Ram_session &ram, + Ram_allocator &ram, Region_map &local_rm, Region_map &remote_rm, Parent_capability parent_cap) diff --git a/repos/base/src/lib/base/env_session_id_space.cc b/repos/base/src/lib/base/env_session_id_space.cc index d7b922559..dca120f1b 100644 --- a/repos/base/src/lib/base/env_session_id_space.cc +++ b/repos/base/src/lib/base/env_session_id_space.cc @@ -48,11 +48,3 @@ Connection_base::Connection_base() _env(internal_env()), _id_space_element(_parent_client, _env.id_space()) { } - - -/* - * \deprecated - */ -Env &Parent_service::_env_deprecated() { return internal_env(); } - - diff --git a/repos/base/src/lib/timeout/timer_connection.cc b/repos/base/src/lib/timeout/timer_connection.cc index 6b0382197..b721f4fb1 100644 --- a/repos/base/src/lib/timeout/timer_connection.cc +++ b/repos/base/src/lib/timeout/timer_connection.cc @@ -140,17 +140,6 @@ Timer::Connection::Connection(Genode::Env &env, char const *label) } -Timer::Connection::Connection() -: - Genode::Connection(session("ram_quota=10K")), - Session_client(cap()), - _signal_handler(internal_env().ep(), *this, &Connection::_handle_timeout) -{ - /* register default signal handler */ - Session_client::sigh(_default_sigh_cap); -} - - void Timer::Connection::_schedule_one_shot(Timeout &timeout, Microseconds duration) { _enable_modern_mode(); diff --git a/repos/os/include/audio_out_session/connection.h b/repos/os/include/audio_out_session/connection.h index a0a8f9216..9c11a7c96 100644 --- a/repos/os/include/audio_out_session/connection.h +++ b/repos/os/include/audio_out_session/connection.h @@ -23,17 +23,6 @@ namespace Audio_out { struct Connection; } struct Audio_out::Connection : Genode::Connection, Audio_out::Session_client { - /** - * Issue session request - * - * \noapi - */ - Genode::Capability _session(Genode::Parent &parent, char const *channel) - { - return session(parent, "ram_quota=%ld, cap_quota=%ld, channel=\"%s\"", - 2*4096 + 2048 + sizeof(Stream), CAP_QUOTA, channel); - } - /** * Constructor * @@ -49,24 +38,12 @@ struct Audio_out::Connection : Genode::Connection, Audio_out::Session_c bool alloc_signal = true, bool progress_signal = false) : - Genode::Connection(env, _session(env.parent(), channel)), + Genode::Connection(env, + session(env.parent(), + "ram_quota=%ld, cap_quota=%ld, channel=\"%s\"", + 2*4096 + 2048 + sizeof(Stream), CAP_QUOTA, channel)), Session_client(env.rm(), cap(), alloc_signal, progress_signal) { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection(const char *channel, - bool alloc_signal = true, - bool progress_signal = false) __attribute__((deprecated)) - : - Genode::Connection(_session(*Genode::env_deprecated()->parent(), channel)), - Session_client(*Genode::env_deprecated()->rm_session(), cap(), alloc_signal, progress_signal) - { } }; #endif /* _INCLUDE__AUDIO_OUT_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/block_session/connection.h b/repos/os/include/block_session/connection.h index fa32c49a8..d87e2fee1 100644 --- a/repos/os/include/block_session/connection.h +++ b/repos/os/include/block_session/connection.h @@ -22,19 +22,6 @@ namespace Block { struct Connection; } struct Block::Connection : Genode::Connection, Session_client { - /** - * Issue session request - * - * \noapi - */ - Genode::Capability _session(Genode::Parent &parent, - char const *label, - Genode::size_t tx_buf_size) - { - return session(parent, "ram_quota=%ld, cap_quota=%ld, tx_buf_size=%ld, label=\"%s\"", - 14*1024 + tx_buf_size, CAP_QUOTA, tx_buf_size, label); - } - /** * Constructor * @@ -47,24 +34,12 @@ struct Block::Connection : Genode::Connection, Session_client Genode::size_t tx_buf_size = 128*1024, const char *label = "") : - Genode::Connection(env, _session(env.parent(), label, tx_buf_size)), + Genode::Connection(env, + session(env.parent(), + "ram_quota=%ld, cap_quota=%ld, tx_buf_size=%ld, label=\"%s\"", + 14*1024 + tx_buf_size, CAP_QUOTA, tx_buf_size, label)), Session_client(cap(), *tx_block_alloc, env.rm()) { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection(Genode::Range_allocator *tx_block_alloc, - Genode::size_t tx_buf_size = 128*1024, - const char *label = "") __attribute__((deprecated)) - : - Genode::Connection(_session(*Genode::env_deprecated()->parent(), label, tx_buf_size)), - Session_client(cap(), *tx_block_alloc, *Genode::env_deprecated()->rm_session()) - { } }; #endif /* _INCLUDE__BLOCK_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/block_session/rpc_object.h b/repos/os/include/block_session/rpc_object.h index 76b8168fc..6d579eec3 100644 --- a/repos/os/include/block_session/rpc_object.h +++ b/repos/os/include/block_session/rpc_object.h @@ -41,16 +41,6 @@ class Block::Session_rpc_object : public Genode::Rpc_objectrm_session(), ep) { } - /** * Return capability to packet-stream channel * diff --git a/repos/os/include/decorator/xml_utils.h b/repos/os/include/decorator/xml_utils.h index bc34a8799..6b0c6d1cd 100644 --- a/repos/os/include/decorator/xml_utils.h +++ b/repos/os/include/decorator/xml_utils.h @@ -19,69 +19,20 @@ namespace Decorator { - template - static T attribute(Xml_node const &, char const *, T); - - template - Genode::String string_attribute(Xml_node const &, char const *, - Genode::String const &); - static Point point_attribute(Xml_node const &); - - static Area area_attribute(Xml_node const &); - - static Rect rect_attribute(Xml_node const &); - - template - static void for_each_sub_node(Xml_node, char const *, FUNC const &); - + static Area area_attribute(Xml_node const &); + static Rect rect_attribute(Xml_node const &); static Color color(Xml_node const &); } -/** - * Read attribute value from XML node - * - * \param node XML node - * \param name attribute name - * \param default_value value returned if no such attribute exists - */ -template -static T -Decorator::attribute(Xml_node const &node, char const *name, T default_value) -{ - T result = default_value; - if (node.has_attribute(name)) - node.attribute(name).value(&result); - - return result; -} - - -/** - * Read string from XML node - */ -template -Genode::String -Decorator::string_attribute(Xml_node const &node, char const *attr, - Genode::String const &default_value) -{ - if (!node.has_attribute(attr)) - return default_value; - - char buf[CAPACITY]; - node.attribute(attr).value(buf, sizeof(buf)); - return Genode::String(Genode::Cstring(buf)); -} - - /** * Read point position from XML node */ static inline Decorator::Point Decorator::point_attribute(Genode::Xml_node const &point) { - return Point(attribute(point, "xpos", 0L), - attribute(point, "ypos", 0L)); } + return Point(point.attribute_value("xpos", 0L), + point.attribute_value("ypos", 0L)); } /** @@ -89,8 +40,8 @@ static inline Decorator::Point Decorator::point_attribute(Genode::Xml_node const */ static inline Decorator::Area Decorator::area_attribute(Genode::Xml_node const &area) { - return Area(attribute(area, "width", 0UL), - attribute(area, "height", 0UL)); + return Area(area.attribute_value("width", 0UL), + area.attribute_value("height", 0UL)); } @@ -103,33 +54,12 @@ static inline Decorator::Rect Decorator::rect_attribute(Genode::Xml_node const & } -/** - * Apply functor 'func' to all XML sub nodes of given type - */ -template -static void -Decorator::for_each_sub_node(Genode::Xml_node node, char const *type, - FUNC const &func) -{ - if (!node.has_sub_node(type)) - return; - - for (node = node.sub_node(type); ; node = node.next()) { - - if (node.has_type(type)) - func(node); - - if (node.last()) break; - } -} - - /** * Read color attribute from XML node */ static inline Genode::Color Decorator::color(Genode::Xml_node const &color) { - return attribute(color, "color", Color(0, 0, 0)); + return color.attribute_value("color", Color(0, 0, 0)); } #endif /* _INCLUDE__DECORATOR__XML_UTILS_H_ */ diff --git a/repos/os/include/file_system/util.h b/repos/os/include/file_system/util.h index 709ad1b70..2561bac71 100644 --- a/repos/os/include/file_system/util.h +++ b/repos/os/include/file_system/util.h @@ -58,17 +58,6 @@ namespace File_system { } - /** - * Return true if specified path is a base name (contains no path delimiters) - * - * \deprecated use !contains_path_delimiter instead - */ - static inline bool is_basename(char const *path) - { - return !contains_path_delimiter(path); - } - - /** * Return true if 'str' is a valid node name */ diff --git a/repos/os/include/file_system_session/connection.h b/repos/os/include/file_system_session/connection.h index 5b7834889..fc4285de8 100644 --- a/repos/os/include/file_system_session/connection.h +++ b/repos/os/include/file_system_session/connection.h @@ -26,89 +26,14 @@ namespace File_system { /* recommended packet transmission buffer size */ enum { DEFAULT_TX_BUF_SIZE = 128*1024 }; - } /** * The base implementation of a File_system connection */ -struct File_system::Connection_base : Genode::Connection, Session_client +struct File_system::Connection : Genode::Connection, Session_client { - /** - * Issue session request - * - * \noapi - */ - Genode::Capability _session(Genode::Parent &parent, - char const *label, - char const *root, - bool writeable, - size_t tx_buf_size) - { - return session(parent, - "ram_quota=%ld, " - "cap_quota=%ld, " - "tx_buf_size=%ld, " - "label=\"%s\", " - "root=\"%s\", " - "writeable=%d", - 8*1024*sizeof(long) + tx_buf_size, - CAP_QUOTA, - tx_buf_size, - label, root, writeable); - } - - /** - * Constructor - * - * \param tx_buffer_alloc allocator used for managing the - * transmission buffer - * \param label session label - * \param root root directory of session - * \param writeable session is writable - * \param tx_buf_size size of transmission buffer in bytes - */ - Connection_base(Genode::Env &env, - Genode::Range_allocator &tx_block_alloc, - char const *label = "", - char const *root = "/", - bool writeable = true, - size_t tx_buf_size = DEFAULT_TX_BUF_SIZE) - : - Genode::Connection(env, _session(env.parent(), label, root, - writeable, tx_buf_size)), - Session_client(cap(), tx_block_alloc, env.rm()) - { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection_base(Genode::Range_allocator &tx_block_alloc, - size_t tx_buf_size = DEFAULT_TX_BUF_SIZE, - char const *label = "", - char const *root = "/", - bool writeable = true) __attribute__((deprecated)) - : - Genode::Connection(_session(*Genode::env_deprecated()->parent(), label, - root, writeable, tx_buf_size)), - Session_client(cap(), tx_block_alloc, *Genode::env_deprecated()->rm_session()) - { } -}; - - -/** - * A File_system connection that upgrades its RAM quota - */ -struct File_system::Connection : File_system::Connection_base -{ - /* reuse constructor */ - using Connection_base::Connection_base; - /** * Extend session quota on demand while calling an RPC function * @@ -122,13 +47,45 @@ struct File_system::Connection : File_system::Connection_base [&] () { return Genode::retry( [&] () { return func(); }, - [&] () { File_system::Connection_base::upgrade_caps(2); }, + [&] () { File_system::Connection::upgrade_caps(2); }, UPGRADE_ATTEMPTS); }, - [&] () { File_system::Connection_base::upgrade_ram(8*1024); }, + [&] () { File_system::Connection::upgrade_ram(8*1024); }, UPGRADE_ATTEMPTS); } + /** + * Constructor + * + * \param tx_buffer_alloc allocator used for managing the + * transmission buffer + * \param label session label + * \param root root directory of session + * \param writeable session is writable + * \param tx_buf_size size of transmission buffer in bytes + */ + Connection(Genode::Env &env, + Genode::Range_allocator &tx_block_alloc, + char const *label = "", + char const *root = "/", + bool writeable = true, + size_t tx_buf_size = DEFAULT_TX_BUF_SIZE) + : + Genode::Connection(env, + session(env.parent(), + "ram_quota=%ld, " + "cap_quota=%ld, " + "tx_buf_size=%ld, " + "label=\"%s\", " + "root=\"%s\", " + "writeable=%d", + 8*1024*sizeof(long) + tx_buf_size, + CAP_QUOTA, + tx_buf_size, + label, root, writeable)), + Session_client(cap(), tx_block_alloc, env.rm()) + { } + Dir_handle dir(Path const &path, bool create) override { return _retry([&] () { diff --git a/repos/os/include/file_system_session/file_system_session.h b/repos/os/include/file_system_session/file_system_session.h index 8e6debf13..5c8ba3b08 100644 --- a/repos/os/include/file_system_session/file_system_session.h +++ b/repos/os/include/file_system_session/file_system_session.h @@ -229,20 +229,6 @@ struct File_system::Status * Return true if node is a symbolic link */ bool symlink() const { return mode & MODE_SYMLINK; } - - /** - * Return true if node is a directory - * - * \deprecated use 'directory' instead - */ - bool is_directory() const { return directory(); } - - /** - * Return true if node is a symbolic link - * - * \deprecated use 'symlink' instead - */ - bool is_symlink() const { return symlink(); } }; diff --git a/repos/os/include/framebuffer_session/connection.h b/repos/os/include/framebuffer_session/connection.h index 1e40048a6..1daa34d6f 100644 --- a/repos/os/include/framebuffer_session/connection.h +++ b/repos/os/include/framebuffer_session/connection.h @@ -76,22 +76,6 @@ class Framebuffer::Connection : public Genode::Connection, mode.format())), Session_client(cap()) { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection(unsigned width = 0, - unsigned height = 0, - Mode::Format format = Mode::INVALID) __attribute__((deprecated)) - : - Genode::Connection(_connect(*Genode::env_deprecated()->parent(), - width, height, format)), - Session_client(cap()) - { } }; #endif /* _INCLUDE__FRAMEBUFFER_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/gpio_session/connection.h b/repos/os/include/gpio_session/connection.h index cdedb3286..ea006d5dc 100644 --- a/repos/os/include/gpio_session/connection.h +++ b/repos/os/include/gpio_session/connection.h @@ -33,19 +33,6 @@ struct Gpio::Connection : Genode::Connection, Session_client CAP_QUOTA, gpio_pin)), Session_client(cap()) { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection(unsigned long gpio_pin) __attribute__((deprecated)) - : - Genode::Connection(session("ram_quota=8K, gpio=%zd", gpio_pin)), - Session_client(cap()) - { } }; #endif /* _INCLUDE__GPIO_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/input_session/client.h b/repos/os/include/input_session/client.h index af0362b76..dd29a1e4f 100644 --- a/repos/os/include/input_session/client.h +++ b/repos/os/include/input_session/client.h @@ -41,18 +41,6 @@ class Input::Session_client : public Genode::Rpc_client _event_ds(local_rm, call()) { } - /** - * Constructor - * - * \deprecated - * \noapi - */ - explicit Session_client(Session_capability session) __attribute__((deprecated)) - : - Genode::Rpc_client(session), - _event_ds(*Genode::env_deprecated()->rm_session(), call()) - { } - Genode::Dataspace_capability dataspace() override { return call(); } diff --git a/repos/os/include/input_session/connection.h b/repos/os/include/input_session/connection.h index 474bc6486..57b6e549f 100644 --- a/repos/os/include/input_session/connection.h +++ b/repos/os/include/input_session/connection.h @@ -21,38 +21,17 @@ namespace Input { struct Connection; } struct Input::Connection : Genode::Connection, Session_client { - /** - * Issue session request - * - * \noapi - */ - Genode::Capability _session(Genode::Parent &parent, char const *label) { - return session(parent, "ram_quota=18K, cap_quota=%u, label=\"%s\"", - CAP_QUOTA, label); } - /** * Constructor */ Connection(Genode::Env &env, char const *label = "") : - Genode::Connection(env, _session(env.parent(), label)), + Genode::Connection(env, + session(env.parent(), + "ram_quota=18K, cap_quota=%u, label=\"%s\"", + CAP_QUOTA, label)), Session_client(env.rm(), cap()) { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection() __attribute__((deprecated)) - : - Genode::Connection( - session(*Genode::env_deprecated()->parent(), - "ram_quota=18K, cap_quota=3")), - Session_client(*Genode::env_deprecated()->rm_session(), cap()) - { } }; #endif /* _INCLUDE__INPUT_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/input_session/input_session.h b/repos/os/include/input_session/input_session.h index f5a588008..156fc4801 100644 --- a/repos/os/include/input_session/input_session.h +++ b/repos/os/include/input_session/input_session.h @@ -50,14 +50,6 @@ struct Input::Session : Genode::Session */ virtual bool pending() const = 0; - /** - * Request input state - * - * \noapi - * \deprecated use 'pending' instead - */ - bool is_pending() const { return pending(); } - /** * Flush pending events to event buffer * diff --git a/repos/os/include/loader_session/connection.h b/repos/os/include/loader_session/connection.h index f2da35ca2..42f80b61a 100644 --- a/repos/os/include/loader_session/connection.h +++ b/repos/os/include/loader_session/connection.h @@ -34,19 +34,6 @@ struct Loader::Connection : Genode::Connection, Session_client CAP_QUOTA + cap_quota.value)), Session_client(cap()) { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection(size_t ram_quota) __attribute__((deprecated)) - : - Genode::Connection(session("ram_quota=%ld", ram_quota)), - Session_client(cap()) - { } }; #endif /* _INCLUDE__LOADER_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/nic_session/connection.h b/repos/os/include/nic_session/connection.h index a826dfbbd..3b8e9ebe7 100644 --- a/repos/os/include/nic_session/connection.h +++ b/repos/os/include/nic_session/connection.h @@ -23,22 +23,6 @@ namespace Nic { struct Connection; } struct Nic::Connection : Genode::Connection, Session_client { - /** - * Issue session request - * - * \noapi - */ - Genode::Capability _session(Genode::Parent &parent, - char const *label, - Genode::size_t tx_buf_size, - Genode::size_t rx_buf_size) - { - return session(parent, - "ram_quota=%ld, cap_quota=%ld, tx_buf_size=%ld, rx_buf_size=%ld, label=\"%s\"", - 32*1024*sizeof(long) + tx_buf_size + rx_buf_size, - CAP_QUOTA, tx_buf_size, rx_buf_size, label); - } - /** * Constructor * @@ -53,27 +37,14 @@ struct Nic::Connection : Genode::Connection, Session_client Genode::size_t rx_buf_size, char const *label = "") : - Genode::Connection(env, _session(env.parent(), label, - tx_buf_size, rx_buf_size)), + Genode::Connection(env, + session(env.parent(), + "ram_quota=%ld, cap_quota=%ld, " + "tx_buf_size=%ld, rx_buf_size=%ld, label=\"%s\"", + 32*1024*sizeof(long) + tx_buf_size + rx_buf_size, + CAP_QUOTA, tx_buf_size, rx_buf_size, label)), Session_client(cap(), *tx_block_alloc, env.rm()) { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection(Genode::Range_allocator *tx_block_alloc, - Genode::size_t tx_buf_size, - Genode::size_t rx_buf_size, - char const *label = "") __attribute__((deprecated)) - : - Genode::Connection(_session(*Genode::env_deprecated()->parent(), label, - tx_buf_size, rx_buf_size)), - Session_client(cap(), *tx_block_alloc, *Genode::env_deprecated()->rm_session()) - { } }; #endif /* _INCLUDE__NIC_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/nic_session/rpc_object.h b/repos/os/include/nic_session/rpc_object.h index d7412c8c6..f3114854b 100644 --- a/repos/os/include/nic_session/rpc_object.h +++ b/repos/os/include/nic_session/rpc_object.h @@ -48,21 +48,8 @@ class Nic::Session_rpc_object : public Genode::Rpc_objectrm_session(), ep), - _rx(rx_ds, *Genode::env_deprecated()->rm_session(), *rx_buffer_alloc, ep) { } + _rx(rx_ds, rm, *rx_buffer_alloc, ep) + { } Genode::Capability _tx_cap() { return _tx.cap(); } Genode::Capability _rx_cap() { return _rx.cap(); } diff --git a/repos/os/include/nitpicker_session/client.h b/repos/os/include/nitpicker_session/client.h index 4a309de9b..0dd54fb43 100644 --- a/repos/os/include/nitpicker_session/client.h +++ b/repos/os/include/nitpicker_session/client.h @@ -41,19 +41,6 @@ class Nitpicker::Session_client : public Genode::Rpc_client _command_buffer(*_command_ds.local_addr()) { } - /** - * Constructor - * - * \deprecated - * \noapi - */ - explicit Session_client(Session_capability session) __attribute__((deprecated)) - : - Rpc_client(session), - _command_ds(*Genode::env_deprecated()->rm_session(), command_dataspace()), - _command_buffer(*_command_ds.local_addr()) - { } - Framebuffer::Session_capability framebuffer_session() override { return call(); } diff --git a/repos/os/include/nitpicker_session/connection.h b/repos/os/include/nitpicker_session/connection.h index c4072dc55..abdba2748 100644 --- a/repos/os/include/nitpicker_session/connection.h +++ b/repos/os/include/nitpicker_session/connection.h @@ -74,24 +74,6 @@ class Nitpicker::Connection : public Genode::Connection, _input(env.rm(), input_session()) { } - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection(char const *label = "") __attribute__((deprecated)) - : - /* establish nitpicker session */ - Genode::Connection(_connect(*Genode::env_deprecated()->parent(), label)), - Session_client(*Genode::env_deprecated()->rm_session(), cap()), - - /* request frame-buffer and input sub sessions */ - _framebuffer(framebuffer_session()), - _input(*Genode::env_deprecated()->rm_session(), input_session()) - { } - void buffer(Framebuffer::Mode mode, bool use_alpha) override { Genode::size_t const needed = ram_quota(mode, use_alpha); diff --git a/repos/os/include/nitpicker_session/nitpicker_session.h b/repos/os/include/nitpicker_session/nitpicker_session.h index 38f74e51c..e54c66988 100644 --- a/repos/os/include/nitpicker_session/nitpicker_session.h +++ b/repos/os/include/nitpicker_session/nitpicker_session.h @@ -162,14 +162,6 @@ struct Nitpicker::Session : Genode::Session bool full() const { return _num >= MAX_COMMANDS; } - /** - * Return true if there is no space left in the command buffer - * - * \noapi - * \deprecated use 'full' instead - */ - bool is_full() const { return full(); } - unsigned num() const { /* copy out _num value to avoid use-after-check problems */ diff --git a/repos/os/include/os/attached_dataspace.h b/repos/os/include/os/attached_dataspace.h deleted file mode 100644 index e065d38d3..000000000 --- a/repos/os/include/os/attached_dataspace.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * \brief Dataspace utility - * \author Norman Feske - * \date 2014-01-10 - * - * \deprecated This header exists for API compatibility only. - */ - -/* - * Copyright (C) 2014-2017 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. - */ - -#warning os/attached_dataspace.h is deprecated, use base/attached_dataspace.h instead - -#ifndef _INCLUDE__OS__ATTACHED_DATASPACE_H_ -#define _INCLUDE__OS__ATTACHED_DATASPACE_H_ - -#include - -#endif /* _INCLUDE__OS__ATTACHED_DATASPACE_H_ */ diff --git a/repos/os/include/os/attached_io_mem_dataspace.h b/repos/os/include/os/attached_io_mem_dataspace.h deleted file mode 100644 index 12b0dbebc..000000000 --- a/repos/os/include/os/attached_io_mem_dataspace.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * \brief I/O MEM dataspace utility - * \author Norman Feske - * \date 2011-05-19 - * - * \deprecated This header exists for API compatibility only. - */ - -/* - * Copyright (C) 2011-2017 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. - */ - -#warning os/attached_io_mem_dataspace.h is deprecated, use base/attached_io_mem_dataspace.h instead - -#ifndef _INCLUDE__OS__ATTACHED_IO_MEM_DATASPACE_H_ -#define _INCLUDE__OS__ATTACHED_IO_MEM_DATASPACE_H_ - -#include - -#endif /* _INCLUDE__OS__ATTACHED_IO_MEM_DATASPACE_H_ */ diff --git a/repos/os/include/os/attached_ram_dataspace.h b/repos/os/include/os/attached_ram_dataspace.h deleted file mode 100644 index c57684a72..000000000 --- a/repos/os/include/os/attached_ram_dataspace.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * \brief RAM dataspace utility - * \author Norman Feske - * \date 2008-03-22 - * - * \deprecated This header exists for API compatibility only. - */ - -/* - * Copyright (C) 2008-2017 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. - */ - -#warning os/attached_ram_dataspace.h is deprecated, use base/attached_ram_dataspace.h instead - -#ifndef _INCLUDE__OS__ATTACHED_RAM_DATASPACE_H_ -#define _INCLUDE__OS__ATTACHED_RAM_DATASPACE_H_ - -#include - -#endif /* _INCLUDE__OS__ATTACHED_RAM_DATASPACE_H_ */ diff --git a/repos/os/include/os/attached_rom_dataspace.h b/repos/os/include/os/attached_rom_dataspace.h deleted file mode 100644 index dac0bc61e..000000000 --- a/repos/os/include/os/attached_rom_dataspace.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * \brief ROM dataspace utility - * \author Norman Feske - * \date 2012-01-09 - * - * \deprecated This header exists for API compatibility only. - */ - -/* - * Copyright (C) 2012-2017 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. - */ - -#warning os/attached_rom_dataspace.h is deprecated, use base/attached_rom_dataspace.h instead - -#ifndef _INCLUDE__OS__ATTACHED_ROM_DATASPACE_H_ -#define _INCLUDE__OS__ATTACHED_ROM_DATASPACE_H_ - -#include - -#endif /* _INCLUDE__OS__ATTACHED_ROM_DATASPACE_H_ */ diff --git a/repos/os/include/os/path.h b/repos/os/include/os/path.h index 2fd22f40d..36967a7dc 100644 --- a/repos/os/include/os/path.h +++ b/repos/os/include/os/path.h @@ -38,14 +38,6 @@ class Genode::Path_base return path[0] == '/'; } - /** - * Return true if path starts with a '/' - * - * \noapi - * \deprecated use 'absolute' instead - */ - static bool is_absolute(char const *path) { return absolute(path); } - static bool ends_with(char c, char const *path) { return path[0] && (path[strlen(path) - 1] == c); @@ -85,13 +77,6 @@ class Genode::Path_base return strlen(path) == 0; } - /** - * Return true if path contains no characters - * - * \deprecated use 'empty' instead - */ - static bool is_empty(char const *path) { return empty(path); } - /** * Remove superfluous single dots followed by a slash from path */ diff --git a/repos/os/include/os/ram_session_guard.h b/repos/os/include/os/ram_session_guard.h deleted file mode 100644 index 3b9b8ef67..000000000 --- a/repos/os/include/os/ram_session_guard.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * \brief RAM session guard - * \author Stefan Kalkowski - * \date 2016-06-03 - */ - -/* - * Copyright (C) 2016-2017 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. - */ - -#ifndef _INCLUDE__OS__RAM_SESSION_GUARD_H_ -#define _INCLUDE__OS__RAM_SESSION_GUARD_H_ - -#include -#include - -namespace Genode { struct Ram_session_guard; } - - -class Genode::Ram_session_guard : public Genode::Ram_allocator -{ - private: - - Ram_allocator &_ram_alloc; - - size_t _quota; - size_t _used = 0; - size_t _withdraw = 0; - - public: - - Ram_session_guard(Ram_allocator &ram_alloc, size_t quota) - : _ram_alloc(ram_alloc), _quota(quota) { } - - /** - * Extend allocation limit - */ - void upgrade(size_t additional_amount) { - _quota += additional_amount; } - - /** - * Consume bytes without actually allocating them - */ - bool withdraw(size_t size) - { - if ((_quota - _used) < size) - return false; - - _used += size; - _withdraw += size; - return true; - } - - /** - * Revert withdraw - */ - bool revert_withdraw(size_t size) - { - if (size > _withdraw) - return false; - - _used -= size; - _withdraw -= size; - - return true; - } - - - /***************************** - ** Ram_allocator interface ** - *****************************/ - - Ram_dataspace_capability alloc(size_t size, - Cache_attribute cached = CACHED) override - { - if (_used + size <= _used || _used + size > _quota) - throw Out_of_ram(); - - Ram_dataspace_capability cap = _ram_alloc.alloc(size, cached); - - if (cap.valid()) - _used += size; - - return cap; - } - - void free(Ram_dataspace_capability ds) override - { - size_t size = Dataspace_client(ds).size(); - _ram_alloc.free(ds); - _used -= size; - } - - size_t dataspace_size(Ram_dataspace_capability ds) const override - { - return _ram_alloc.dataspace_size(ds); - } -}; - -#endif /* _INCLUDE__OS__RAM_SESSION_GUARD_H_ */ diff --git a/repos/os/include/os/reporter.h b/repos/os/include/os/reporter.h index 8f6d84ba4..ea27b4e76 100644 --- a/repos/os/include/os/reporter.h +++ b/repos/os/include/os/reporter.h @@ -35,6 +35,8 @@ class Genode::Reporter private: + Env &_env; + Name const _xml_name; Name const _label; @@ -45,10 +47,11 @@ class Genode::Reporter struct Connection { Report::Connection report; - Attached_dataspace ds = { *env_deprecated()->rm_session(), report.dataspace() }; + Attached_dataspace ds; - Connection(char const *name, size_t buffer_size) - : report(false, name, buffer_size) { } + Connection(Env &env, char const *name, size_t buffer_size) + : report(env, name, buffer_size), ds(env.rm(), report.dataspace()) + { } }; Constructible _conn { }; @@ -65,23 +68,10 @@ class Genode::Reporter public: - Reporter(Env &, char const *xml_name, char const *label = nullptr, + Reporter(Env &env, char const *xml_name, char const *label = nullptr, size_t buffer_size = 4096) : - _xml_name(xml_name), _label(label ? label : xml_name), - _buffer_size(buffer_size) - { } - - /** - * Constructor - * - * \deprecated - * \noapi - */ - Reporter(char const *xml_name, char const *label = nullptr, - size_t buffer_size = 4096) __attribute__((deprecated)) - : - _xml_name(xml_name), _label(label ? label : xml_name), + _env(env), _xml_name(xml_name), _label(label ? label : xml_name), _buffer_size(buffer_size) { } @@ -93,7 +83,7 @@ class Genode::Reporter if (enabled == _enabled) return; if (enabled) - _conn.construct(_label.string(), _buffer_size); + _conn.construct(_env, _label.string(), _buffer_size); else _conn.destruct(); @@ -105,14 +95,6 @@ class Genode::Reporter */ bool enabled() const { return _enabled; } - /** - * Return true if reporter is enabled - * - * \noapi - * \deprecated use 'enabled' instead - */ - bool is_enabled() const { return enabled(); } - Name name() const { return _label; } /** @@ -219,7 +201,9 @@ class Genode::Expanding_reporter { retry( - [&] () { _reporter->report(node.addr(), node.size()); }, + [&] () { + node.with_raw_node([&] (char const *start, size_t length) { + _reporter->report(start, length); }); }, [&] () { _increase_report_buffer(); } ); diff --git a/repos/os/include/os/server.h b/repos/os/include/os/server.h deleted file mode 100644 index 873eac84a..000000000 --- a/repos/os/include/os/server.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * \brief Skeleton for implementing servers - * \author Norman Feske - * \date 2013-09-07 - */ - -/* - * Copyright (C) 2013-2017 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. - */ - -#ifndef _INCLUDE__OS__SERVER_H_ -#define _INCLUDE__OS__SERVER_H_ - -#include -#include - -namespace Server { - - using namespace Genode; - - void wait_and_dispatch_one_signal(); - - - /*********************************************************** - ** Functions to be provided by the server implementation ** - ***********************************************************/ - - /* - * Avoid the ambiguity of 'size_t' if the header is included from - * libc-using code. - */ - Genode::size_t stack_size(); - - char const *name(); - - void construct(Entrypoint &); -} - -#endif /* _INCLUDE__OS__SERVER_H_ */ diff --git a/repos/os/include/os/signal_rpc_dispatcher.h b/repos/os/include/os/signal_rpc_dispatcher.h deleted file mode 100644 index 23c7195ed..000000000 --- a/repos/os/include/os/signal_rpc_dispatcher.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * \brief Utility for dispatching signals at at RPC entrypoint - * \author Norman Feske - * \date 2013-09-07 - * - * \deprecated This header merely exists to maintain API compatibility - * to Genode 15.11. Its functionality moved to base/signal.h. - * The header will eventually be removed. - */ - -/* - * Copyright (C) 2013-2017 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. - */ - -#ifndef _INCLUDE__OS__SIGNAL_RPC_DISPATCHER_H_ -#define _INCLUDE__OS__SIGNAL_RPC_DISPATCHER_H_ - -#include - -namespace Genode { template class Signal_rpc_member; } - - -/** - * Signal dispatcher for handling signals by an object method - * - * This utility associates object methods with signals. It is intended to - * be used as a member variable of the class that handles incoming signals - * of a certain type. The constructor takes a pointer-to-member to the - * signal-handling method as argument. If a signal is received at the - * common signal reception code, this method will be invoked by calling - * 'Signal_dispatcher_base::dispatch'. - * - * \param T type of signal-handling class - * \param EP type of entrypoint handling signal RPC - * - * \deprecated this class template is superseded by the 'Signal_handler' - * in base/signal.h - */ -template -struct Genode::Signal_rpc_member : Genode::Signal_dispatcher_base, - Genode::Signal_context_capability -{ - EP &ep; - T &obj; - void (T::*member) (unsigned); - - /** - * Constructor - * - * \param ep entrypoint managing this signal RPC - * \param obj,member object and method to call when - * the signal occurs - */ - Signal_rpc_member(EP &ep, T &obj, void (T::*member)(unsigned)) - : Signal_context_capability(ep.manage(*this)), - ep(ep), obj(obj), member(member) { } - - ~Signal_rpc_member() { ep.dissolve(*this); } - - /** - * Interface of Signal_dispatcher_base - */ - void dispatch(unsigned num) { (obj.*member)(num); } -}; - -#endif /* _INCLUDE__OS__SIGNAL_RPC_DISPATCHER_H_ */ diff --git a/repos/os/include/platform_session/connection.h b/repos/os/include/platform_session/connection.h index 1c58723bc..24e82bb4b 100644 --- a/repos/os/include/platform_session/connection.h +++ b/repos/os/include/platform_session/connection.h @@ -30,17 +30,6 @@ struct Platform::Connection : Genode::Connection, Client : Genode::Connection(env, session(env.parent(), "ram_quota=6K, cap_quota=%ld", CAP_QUOTA)), Client(cap()) { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection() __attribute__((deprecated)) - : Genode::Connection(session("ram_quota=6K")), - Client(cap()) { } }; #endif /* _INCLUDE__PLATFORM_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/regulator_session/connection.h b/repos/os/include/regulator_session/connection.h index 608fec2d6..ef9c7fa14 100644 --- a/repos/os/include/regulator_session/connection.h +++ b/repos/os/include/regulator_session/connection.h @@ -23,19 +23,6 @@ namespace Regulator { struct Connection; } struct Regulator::Connection : Genode::Connection, Session_client { - /** - * Issue session request - * - * \noapi - */ - Genode::Capability _session(Genode::Parent &, - char const *label, - Regulator_id regulator) - { - return session("ram_quota=8K, cap_quota=%ld, regulator=\"%s\", label=\"%s\"", - CAP_QUOTA, regulator_name_by_id(regulator), label); - } - /** * Constructor * @@ -44,19 +31,10 @@ struct Regulator::Connection : Genode::Connection, Session_client */ Connection(Genode::Env &env, Regulator_id regulator, const char * label = "") : - Genode::Connection(env, _session(env.parent(), label, regulator)), - Session_client(cap()) - { } - - /** - * Constructor - * - * \param regulator identifier for the specific regulator - * \param label string identifier of the client - */ - Connection(Regulator_id regulator, const char * label = "") __attribute__((deprecated)) - : - Genode::Connection(_session(*Genode::env_deprecated()->parent(), label, regulator)), + Genode::Connection(env, + session(env.parent(), + "ram_quota=8K, cap_quota=%ld, regulator=\"%s\", label=\"%s\"", + CAP_QUOTA, regulator_name_by_id(regulator), label)), Session_client(cap()) { } }; diff --git a/repos/os/include/report_session/connection.h b/repos/os/include/report_session/connection.h index 95dc41ef9..aaac5380e 100644 --- a/repos/os/include/report_session/connection.h +++ b/repos/os/include/report_session/connection.h @@ -22,54 +22,16 @@ namespace Report { struct Connection; } struct Report::Connection : Genode::Connection, Session_client { - enum { RAM_QUOTA = 6*4096 }; /* value used for 'Slave::Connection' */ + enum { RAM_QUOTA = 10*1024 }; /* value used for 'Slave::Connection' */ - /** - * Issue session request - * - * \noapi - */ - Genode::Capability - _session(Genode::Parent &parent, char const *label, size_t buffer_size) - { - return session(parent, "label=\"%s\", ram_quota=%ld, cap_quota=%ld, buffer_size=%zd", - label, 10*1024 + buffer_size, CAP_QUOTA, buffer_size); - } - - /** - * Constructor - */ Connection(Genode::Env &env, char const *label, size_t buffer_size = 4096) : - Genode::Connection(env, _session(env.parent(), label, buffer_size)), - Session_client(cap()) - { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection(char const *label, size_t buffer_size = 4096) __attribute__((deprecated)) - : - Genode::Connection(_session(*Genode::env_deprecated()->parent(), label, buffer_size)), - Session_client(cap()) - { } - - /** - * Constructor - * - * \deprecated - * \noapi - * - * This variant solely exists to be called by deprecated functions. It - * will be removed as soon as those functions are gone. - */ - Connection(bool, char const *label, size_t buffer_size = 4096) - : - Genode::Connection(_session(*Genode::env_deprecated()->parent(), label, buffer_size)), + Genode::Connection(env, + session(env.parent(), + "label=\"%s\", ram_quota=%ld, " + "cap_quota=%ld, buffer_size=%zd", + label, RAM_QUOTA + buffer_size, + CAP_QUOTA, buffer_size)), Session_client(cap()) { } }; diff --git a/repos/os/include/rtc_session/connection.h b/repos/os/include/rtc_session/connection.h index 5252ff443..ef7827c5b 100644 --- a/repos/os/include/rtc_session/connection.h +++ b/repos/os/include/rtc_session/connection.h @@ -32,19 +32,6 @@ struct Rtc::Connection : Genode::Connection, Session_client env, session(env.parent(), "ram_quota=8K, label=\"%s\"", label)), Session_client(cap()) { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection() __attribute__((deprecated)) - : - Genode::Connection(session("ram_quota=8K")), - Session_client(cap()) - { } }; #endif /* _INCLUDE__RTC_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/spec/imx53/imx_framebuffer_session/connection.h b/repos/os/include/spec/imx53/imx_framebuffer_session/connection.h index feb126d49..df5a140fd 100644 --- a/repos/os/include/spec/imx53/imx_framebuffer_session/connection.h +++ b/repos/os/include/spec/imx53/imx_framebuffer_session/connection.h @@ -70,20 +70,6 @@ class Framebuffer::Imx_connection : public Genode::Connection, mode.format())), Imx_client(cap()) { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Imx_connection(unsigned width = 0, - unsigned height = 0, - Mode::Format format = Mode::INVALID) __attribute__((deprecated)) - : Genode::Connection(_connect(*Genode::env_deprecated()->parent(), - width, height, format)), - Imx_client(cap()) { } }; #endif /* _INCLUDE__IMX_FRAMEBUFFER_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/spec/x86/platform_session/connection.h b/repos/os/include/spec/x86/platform_session/connection.h index 0583ae1a3..e76884c87 100644 --- a/repos/os/include/spec/x86/platform_session/connection.h +++ b/repos/os/include/spec/x86/platform_session/connection.h @@ -27,25 +27,12 @@ struct Platform::Connection : Genode::Connection, Client */ Connection(Genode::Env &env) : - Genode::Connection(env, session("ram_quota=16K, cap_quota=%u", + Genode::Connection(env, session(env.parent(), + "ram_quota=16K, cap_quota=%u", CAP_QUOTA)), Client(cap()) { } - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection() __attribute__((deprecated)) - : - Genode::Connection(session("ram_quota=16K, cap_quota=%u", - CAP_QUOTA)), - Client(cap()) - { } - template auto with_upgrade(FUNC func) -> decltype(func()) { diff --git a/repos/os/include/terminal_session/client.h b/repos/os/include/terminal_session/client.h index 4b9372de2..4c04c3178 100644 --- a/repos/os/include/terminal_session/client.h +++ b/repos/os/include/terminal_session/client.h @@ -46,12 +46,6 @@ class Terminal::Session_client : public Genode::Rpc_client _io_buffer(local_rm, call()) { } - Session_client(Genode::Capability cap) __attribute__((deprecated)) - : - Genode::Rpc_client(cap), - _io_buffer(*Genode::env_deprecated()->rm_session(), call()) - { } - Size size() override { return call(); } bool avail() override { return call(); } diff --git a/repos/os/include/terminal_session/connection.h b/repos/os/include/terminal_session/connection.h index c575be375..acc27c64f 100644 --- a/repos/os/include/terminal_session/connection.h +++ b/repos/os/include/terminal_session/connection.h @@ -56,22 +56,6 @@ struct Terminal::Connection : Genode::Connection, Session_client { wait_for_connection(cap()); } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection(char const *label = "") __attribute__((deprecated)) - : - Genode::Connection(session("ram_quota=%zd, label=\"%s\"", - 2*4096, label)), - Session_client(*Genode::env_deprecated()->rm_session(), cap()) - { - wait_for_connection(cap()); - } }; #endif /* _INCLUDE__TERMINAL_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/uart_session/client.h b/repos/os/include/uart_session/client.h index 92b2c0948..00c22db26 100644 --- a/repos/os/include/uart_session/client.h +++ b/repos/os/include/uart_session/client.h @@ -34,11 +34,6 @@ class Uart::Session_client : public Genode::Rpc_client Genode::Rpc_client(cap), _terminal(local_rm, cap) { } - Session_client(Genode::Capability cap) __attribute__((deprecated)) - : - Genode::Rpc_client(cap), _terminal(*Genode::env_deprecated()->rm_session(), cap) - { } - /******************** ** UART interface ** diff --git a/repos/os/include/uart_session/connection.h b/repos/os/include/uart_session/connection.h index c5c80772a..4ebf5a80f 100644 --- a/repos/os/include/uart_session/connection.h +++ b/repos/os/include/uart_session/connection.h @@ -32,21 +32,6 @@ struct Uart::Connection : Genode::Connection, Session_client { Terminal::Connection::wait_for_connection(cap()); } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection() __attribute__((deprecated)) - : - Genode::Connection(session("ram_quota=%ld", 2*4096)), - Session_client(*Genode::env_deprecated()->rm_session(), cap()) - { - Terminal::Connection::wait_for_connection(cap()); - } }; #endif /* _INCLUDE__UART_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/usb/usb.h b/repos/os/include/usb/usb.h index a15ad262b..6ad2b68ae 100644 --- a/repos/os/include/usb/usb.h +++ b/repos/os/include/usb/usb.h @@ -95,12 +95,6 @@ class Usb::Endpoint : public Endpoint_descriptor bool bulk() const { return (attributes & 0x3) == ENDPOINT_BULK; } bool interrupt() const { return (attributes & 0x3) == ENDPOINT_INTERRUPT; } - /* - * \deprecated use 'bulk' and 'interrupt' instead - */ - bool is_bulk() const { return bulk(); } - bool is_interrupt() const { return interrupt(); } - void dump() { if (verbose_descr) @@ -331,7 +325,7 @@ class Usb::Interface : public Meta_data { _check(); - if (!ep.is_bulk()) + if (!ep.bulk()) throw Session::Invalid_endpoint(); p.type = Usb::Packet_descriptor::BULK; @@ -350,7 +344,7 @@ class Usb::Interface : public Meta_data { _check(); - if (!ep.is_interrupt()) + if (!ep.interrupt()) throw Session::Invalid_endpoint(); p.type = Usb::Packet_descriptor::IRQ; diff --git a/repos/os/include/usb_session/connection.h b/repos/os/include/usb_session/connection.h index 8d06535f9..bc60a3d2d 100644 --- a/repos/os/include/usb_session/connection.h +++ b/repos/os/include/usb_session/connection.h @@ -22,19 +22,6 @@ namespace Usb { struct Connection; } struct Usb::Connection : Genode::Connection, Session_client { - /** - * Issue session request - * - * \noapi - */ - Capability _session(Genode::Parent &parent, - char const *label, - Genode::size_t tx_buf_size) - { - return session(parent, "ram_quota=%ld, cap_quota=%ld, tx_buf_size=%ld, label=\"%s\"", - 3 * 4096 + tx_buf_size, CAP_QUOTA, tx_buf_size, label); - } - /** * Constructor */ @@ -45,26 +32,12 @@ struct Usb::Connection : Genode::Connection, Session_client Genode::Signal_context_capability sigh_state_changed = Genode::Signal_context_capability()) : - Genode::Connection(env, _session(env.parent(), label, tx_buf_size)), + Genode::Connection(env, + session(env.parent(), + "ram_quota=%ld, cap_quota=%ld, tx_buf_size=%ld, label=\"%s\"", + 3 * 4096 + tx_buf_size, CAP_QUOTA, tx_buf_size, label)), Session_client(cap(), *tx_block_alloc, env.rm(), sigh_state_changed) { } - - /** - * Constructor - * - * \noapi - * \deprecated Use the constructor with 'Env &' as first - * argument instead - */ - Connection(Genode::Range_allocator *tx_block_alloc, - char const *label = "", - Genode::size_t tx_buf_size = 512 * 1024, - Genode::Signal_context_capability sigh_state_changed = - Genode::Signal_context_capability()) __attribute__((deprecated)) - : - Genode::Connection(_session(*Genode::env_deprecated()->parent(), label, tx_buf_size)), - Session_client(cap(), *tx_block_alloc, *Genode::env_deprecated()->rm_session(), sigh_state_changed) - { } }; #endif /* _INCLUDE__USB_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/usb_session/usb_session.h b/repos/os/include/usb_session/usb_session.h index 60b3b5704..ee379fc91 100644 --- a/repos/os/include/usb_session/usb_session.h +++ b/repos/os/include/usb_session/usb_session.h @@ -91,14 +91,6 @@ struct Usb::Packet_descriptor : Genode::Packet_descriptor */ bool read_transfer() { return transfer.ep & ENDPOINT_IN; } - /** - * Return true if packet is a read transfer - * - * \noapi - * \deprecated use 'read_transfer' instead - */ - bool is_read_transfer() { return read_transfer(); } - Packet_descriptor(off_t offset = 0, size_t size = 0) : Genode::Packet_descriptor(offset, size) { } diff --git a/repos/os/include/util/color.h b/repos/os/include/util/color.h index a58893e3f..b64cbf8a2 100644 --- a/repos/os/include/util/color.h +++ b/repos/os/include/util/color.h @@ -30,12 +30,6 @@ struct Genode::Color bool opaque() const { return a == 255; } bool transparent() const { return a == 0; } - /* - * \deprecated use 'opaque' and 'transparent' instead - */ - bool is_opaque() const { return opaque(); } - bool is_transparent() const { return transparent(); } - Color(int red, int green, int blue, int alpha = 255) : r(red), g(green), b(blue), a(alpha) { } diff --git a/repos/os/lib/mk/server.mk b/repos/os/lib/mk/server.mk deleted file mode 100644 index 89472ab84..000000000 --- a/repos/os/lib/mk/server.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = server.cc - -vpath server.cc $(REP_DIR)/src/lib/server diff --git a/repos/os/src/lib/server/server.cc b/repos/os/src/lib/server/server.cc deleted file mode 100644 index d1d8b2b24..000000000 --- a/repos/os/src/lib/server/server.cc +++ /dev/null @@ -1,38 +0,0 @@ -/* - * \brief Skeleton for implementing servers - * \author Norman Feske - * \date 2013-09-07 - */ - -/* - * Copyright (C) 2013-2017 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. - */ - -#include -#include - - -Genode::size_t Component::stack_size() -{ - return Server::stack_size(); -} - - -static Genode::Env *_env; - - -void Component::construct(Genode::Env &env) -{ - _env = &env; - Server::construct(env.ep()); -} - - -void Server::wait_and_dispatch_one_signal() -{ - if (_env) - _env->ep().wait_and_dispatch_one_io_signal(); -}