From a7f40b24cad0a34f0ac0bd9256a5285a6bf7cd94 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 9 Jan 2017 15:18:49 +0100 Subject: [PATCH] Warn about the use of deprecated env() function This patch enables warnings if one of the deprecate functions that rely in the implicit use of the global Genode::env() accessor are called. For the time being, some places within the base framework continue to rely on the global function while omitting the warning by calling 'env_deprecated' instead of 'env'. Issue #1987 --- .../src/lib/base/thread_bootstrap.cc | 2 +- repos/base-hw/include/vm_session/connection.h | 4 +-- repos/base-hw/src/lib/base/thread_start.cc | 8 +++--- .../include/sync_session/connection.h | 3 +- .../include/base/internal/region_map_mmap.h | 2 +- repos/base-linux/src/lib/base/platform_env.cc | 2 +- repos/base-linux/src/lib/base/thread_linux.cc | 6 ++-- repos/base-nova/src/lib/base/thread_start.cc | 6 ++-- .../src/lib/base/thread_bootstrap.cc | 2 +- .../src/lib/base/thread_bootstrap.cc | 2 +- repos/base/include/base/attached_dataspace.h | 10 ++++--- .../include/base/attached_io_mem_dataspace.h | 6 ++-- .../include/base/attached_ram_dataspace.h | 4 +-- .../include/base/attached_rom_dataspace.h | 5 ++-- repos/base/include/base/connection.h | 2 +- repos/base/include/cap_session/connection.h | 8 ++++-- repos/base/include/cpu_session/connection.h | 4 +-- repos/base/include/deprecated/env.h | 16 ++++++++++- .../base/include/io_mem_session/connection.h | 20 +++++++++++-- .../base/include/io_port_session/connection.h | 4 +-- repos/base/include/irq_session/connection.h | 4 +-- repos/base/include/log_session/connection.h | 2 +- repos/base/include/pd_session/connection.h | 2 +- repos/base/include/ram_session/connection.h | 4 +-- repos/base/include/rm_session/connection.h | 2 +- repos/base/include/rom_session/connection.h | 28 +++++++++++++++++-- repos/base/include/trace_session/connection.h | 2 +- repos/base/lib/symbols/ld | 2 +- .../src/core/include/trace/control_area.h | 8 +++--- .../core/include/trace/session_component.h | 4 +-- .../src/core/include/trace/subject_registry.h | 8 +++--- repos/base/src/core/main.cc | 8 +++--- .../base/src/core/trace_session_component.cc | 2 +- .../internal/expanding_ram_session_client.h | 4 +-- .../base/internal/upgradeable_client.h | 2 +- repos/base/src/lib/base/component.cc | 16 +++++------ repos/base/src/lib/base/entrypoint.cc | 4 +++ repos/base/src/lib/base/env_deprecated.cc | 2 +- repos/base/src/lib/base/log_console.cc | 2 +- repos/base/src/lib/base/rpc_cap_alloc.cc | 4 +-- repos/base/src/lib/base/signal.cc | 8 +++--- repos/base/src/lib/base/signal_common.cc | 2 +- repos/base/src/lib/base/signal_submit.cc | 2 +- repos/base/src/lib/base/thread.cc | 4 +-- repos/base/src/lib/base/thread_start.cc | 6 ++-- repos/base/src/lib/base/trace.cc | 18 ++++++------ repos/base/src/lib/cxx/misc.cc | 2 +- repos/base/src/lib/startup/_main.cc | 2 +- .../base/src/lib/startup/init_main_thread.cc | 2 +- repos/gems/include/gems/chunky_texture.h | 20 +++++++++++-- .../os/include/audio_out_session/connection.h | 6 ++-- repos/os/include/block/driver.h | 16 +++++++++-- repos/os/include/block_session/connection.h | 6 ++-- repos/os/include/block_session/rpc_object.h | 15 ++++++++-- .../include/file_system_session/connection.h | 6 ++-- .../include/framebuffer_session/connection.h | 4 +-- repos/os/include/gpio_session/connection.h | 2 +- repos/os/include/input/component.h | 6 ++-- repos/os/include/input_session/client.h | 15 ++++++---- repos/os/include/input_session/connection.h | 8 +++--- repos/os/include/loader_session/connection.h | 2 +- repos/os/include/nic_session/connection.h | 6 ++-- repos/os/include/nic_session/rpc_object.h | 21 ++++++++++++-- repos/os/include/nitpicker_session/client.h | 20 +++++++++++-- .../os/include/nitpicker_session/connection.h | 12 ++++---- repos/os/include/os/reporter.h | 19 +++++++++++-- .../os/include/platform_session/connection.h | 2 +- .../os/include/regulator_session/connection.h | 4 +-- repos/os/include/report_session/connection.h | 19 +++++++++++-- repos/os/include/rtc_session/connection.h | 2 +- .../imx_framebuffer_session/connection.h | 4 +-- .../spec/x86/platform_session/connection.h | 2 +- repos/os/include/terminal_session/client.h | 10 +++++-- .../os/include/terminal_session/connection.h | 6 ++-- repos/os/include/timer_session/connection.h | 2 +- repos/os/include/uart_session/client.h | 9 ++++-- repos/os/include/uart_session/connection.h | 6 ++-- repos/os/include/usb_session/connection.h | 6 ++-- repos/os/src/lib/config/config.cc | 8 ++++-- repos/ports/include/noux_session/connection.h | 2 +- 80 files changed, 360 insertions(+), 178 deletions(-) diff --git a/repos/base-fiasco/src/lib/base/thread_bootstrap.cc b/repos/base-fiasco/src/lib/base/thread_bootstrap.cc index 70daa21c3b..2e8a7ecb19 100644 --- a/repos/base-fiasco/src/lib/base/thread_bootstrap.cc +++ b/repos/base-fiasco/src/lib/base/thread_bootstrap.cc @@ -37,5 +37,5 @@ void Thread::_thread_bootstrap() { } void Thread::_init_platform_thread(size_t, Type type) { if (type == NORMAL) { return; } - _thread_cap = Genode::env()->parent()->main_thread_cap(); + _thread_cap = Genode::env_deprecated()->parent()->main_thread_cap(); } diff --git a/repos/base-hw/include/vm_session/connection.h b/repos/base-hw/include/vm_session/connection.h index 280bd2611a..629ba43bda 100644 --- a/repos/base-hw/include/vm_session/connection.h +++ b/repos/base-hw/include/vm_session/connection.h @@ -60,9 +60,9 @@ struct Genode::Vm_connection : Connection, Vm_session_client */ Vm_connection(const char *label = "", long priority = Cpu_session::DEFAULT_PRIORITY, - unsigned long affinity = 0) + unsigned long affinity = 0) __attribute__((deprecated)) : - Connection(_session(*env()->parent(), label, priority, affinity)), + Connection(_session(*env_deprecated()->parent(), label, priority, affinity)), Vm_session_client(cap()) { } }; diff --git a/repos/base-hw/src/lib/base/thread_start.cc b/repos/base-hw/src/lib/base/thread_start.cc index cfc4b1adf1..0ed733713a 100644 --- a/repos/base-hw/src/lib/base/thread_start.cc +++ b/repos/base-hw/src/lib/base/thread_start.cc @@ -37,12 +37,12 @@ namespace Hw { void Thread::_init_platform_thread(size_t weight, Type type) { - if (!_cpu_session) { _cpu_session = env()->cpu_session(); } + if (!_cpu_session) { _cpu_session = env_deprecated()->cpu_session(); } if (type == NORMAL) { /* create server object */ addr_t const utcb = (addr_t)&_stack->utcb(); - _thread_cap = _cpu_session->create_thread(env()->pd_session_cap(), + _thread_cap = _cpu_session->create_thread(env_deprecated()->pd_session_cap(), name(), _affinity, Weight(weight), utcb); return; @@ -63,14 +63,14 @@ void Thread::_init_platform_thread(size_t weight, Type type) } /* adjust initial object state in case of a main thread */ native_thread().cap = Hw::_main_thread_cap; - _thread_cap = env()->parent()->main_thread_cap(); + _thread_cap = env_deprecated()->parent()->main_thread_cap(); } void Thread::_deinit_platform_thread() { if (!_cpu_session) - _cpu_session = env()->cpu_session(); + _cpu_session = env_deprecated()->cpu_session(); _cpu_session->kill_thread(_thread_cap); diff --git a/repos/base-hw/src/test/cpu_quota/include/sync_session/connection.h b/repos/base-hw/src/test/cpu_quota/include/sync_session/connection.h index 1e65df4376..9cf58ef8ce 100644 --- a/repos/base-hw/src/test/cpu_quota/include/sync_session/connection.h +++ b/repos/base-hw/src/test/cpu_quota/include/sync_session/connection.h @@ -50,7 +50,8 @@ class Sync::Connection : public Genode::Connection, * * \throw Connection_failed */ - Connection() : + Connection() __attribute__((deprecated)) + : Genode::Connection(_create_session()), Session_client(cap()) { } diff --git a/repos/base-linux/src/include/base/internal/region_map_mmap.h b/repos/base-linux/src/include/base/internal/region_map_mmap.h index 37c0f79f80..c448a66ab5 100644 --- a/repos/base-linux/src/include/base/internal/region_map_mmap.h +++ b/repos/base-linux/src/include/base/internal/region_map_mmap.h @@ -107,7 +107,7 @@ class Genode::Region_map_mmap : public Region_map, public Dataspace { /* detach sub RM session when destructed */ if (_sub_rm && _is_attached()) - env()->rm_session()->detach((void *)_base); + env_deprecated()->rm_session()->detach((void *)_base); } diff --git a/repos/base-linux/src/lib/base/platform_env.cc b/repos/base-linux/src/lib/base/platform_env.cc index 167a5b48d8..9de4c35dc0 100644 --- a/repos/base-linux/src/lib/base/platform_env.cc +++ b/repos/base-linux/src/lib/base/platform_env.cc @@ -180,7 +180,7 @@ namespace Genode { Socket_pair server_socket_pair() { - Linux_native_cpu_client native_cpu(env()->cpu_session()->native_cpu()); + Linux_native_cpu_client native_cpu(env_deprecated()->cpu_session()->native_cpu()); Socket_pair socket_pair; diff --git a/repos/base-linux/src/lib/base/thread_linux.cc b/repos/base-linux/src/lib/base/thread_linux.cc index 70436be7d4..e706bf35b0 100644 --- a/repos/base-linux/src/lib/base/thread_linux.cc +++ b/repos/base-linux/src/lib/base/thread_linux.cc @@ -86,11 +86,11 @@ void Thread::_init_platform_thread(size_t weight, Type type) { /* if no cpu session is given, use it from the environment */ if (!_cpu_session) - _cpu_session = env()->cpu_session(); + _cpu_session = env_deprecated()->cpu_session(); /* for normal threads create an object at the CPU session */ if (type == NORMAL) { - _thread_cap = _cpu_session->create_thread(env()->pd_session_cap(), + _thread_cap = _cpu_session->create_thread(env_deprecated()->pd_session_cap(), _stack->name().string(), Affinity::Location(), Weight()); @@ -98,7 +98,7 @@ void Thread::_init_platform_thread(size_t weight, Type type) } /* adjust initial object state for main threads */ native_thread().futex_counter = main_thread_futex_counter; - _thread_cap = env()->parent()->main_thread_cap(); + _thread_cap = env_deprecated()->parent()->main_thread_cap(); } diff --git a/repos/base-nova/src/lib/base/thread_start.cc b/repos/base-nova/src/lib/base/thread_start.cc index 04047b70ff..87817af9a7 100644 --- a/repos/base-nova/src/lib/base/thread_start.cc +++ b/repos/base-nova/src/lib/base/thread_start.cc @@ -79,7 +79,7 @@ void Thread::_init_platform_thread(size_t weight, Type type) /* for main threads the member initialization differs */ if (type == MAIN || type == REINITIALIZED_MAIN) { - _thread_cap = env()->parent()->main_thread_cap(); + _thread_cap = env_deprecated()->parent()->main_thread_cap(); native_thread().exc_pt_sel = 0; native_thread().ec_sel = Nova::PT_SEL_MAIN_EC; @@ -107,10 +107,10 @@ void Thread::_init_platform_thread(size_t weight, Type type) /* if no cpu session is given, use it from the environment */ if (!_cpu_session) - _cpu_session = env()->cpu_session(); + _cpu_session = env_deprecated()->cpu_session(); /* create thread at core */ - _thread_cap = _cpu_session->create_thread(env()->pd_session_cap(), name(), + _thread_cap = _cpu_session->create_thread(env_deprecated()->pd_session_cap(), name(), _affinity, Weight(weight)); if (!_thread_cap.valid()) throw Cpu_session::Thread_creation_failed(); diff --git a/repos/base-okl4/src/lib/base/thread_bootstrap.cc b/repos/base-okl4/src/lib/base/thread_bootstrap.cc index ea74ac2038..24286d79c5 100644 --- a/repos/base-okl4/src/lib/base/thread_bootstrap.cc +++ b/repos/base-okl4/src/lib/base/thread_bootstrap.cc @@ -84,5 +84,5 @@ void Genode::Thread::_init_platform_thread(size_t, Type type) { if (type == NORMAL) { return; } native_thread().l4id.raw = main_thread_tid.raw; - _thread_cap = env()->parent()->main_thread_cap(); + _thread_cap = env_deprecated()->parent()->main_thread_cap(); } diff --git a/repos/base-pistachio/src/lib/base/thread_bootstrap.cc b/repos/base-pistachio/src/lib/base/thread_bootstrap.cc index c5942e2aad..509d1ed95b 100644 --- a/repos/base-pistachio/src/lib/base/thread_bootstrap.cc +++ b/repos/base-pistachio/src/lib/base/thread_bootstrap.cc @@ -52,5 +52,5 @@ void Genode::Thread::_init_platform_thread(size_t, Type type) { if (type == NORMAL) { return; } native_thread().l4id = main_thread_tid; - _thread_cap = env()->parent()->main_thread_cap(); + _thread_cap = env_deprecated()->parent()->main_thread_cap(); } diff --git a/repos/base/include/base/attached_dataspace.h b/repos/base/include/base/attached_dataspace.h index bbf157c4d2..c30dcfd91e 100644 --- a/repos/base/include/base/attached_dataspace.h +++ b/repos/base/include/base/attached_dataspace.h @@ -33,6 +33,8 @@ class Genode::Attached_dataspace : Noncopyable Dataspace_capability _ds; + Region_map &_rm; + size_t const _size = { Dataspace_client(_ds).size() }; void * _local_addr = nullptr; @@ -54,7 +56,7 @@ class Genode::Attached_dataspace : Noncopyable * \throw Invalid_dataspace */ Attached_dataspace(Region_map &rm, Dataspace_capability ds) - : _ds(_check(ds)), _local_addr(rm.attach(_ds)) { } + : _ds(_check(ds)), _rm(rm), _local_addr(_rm.attach(_ds)) { } /** * Constructor @@ -63,8 +65,8 @@ class Genode::Attached_dataspace : Noncopyable * \deprecated Use the constructor with 'Region_map &' as first * argument instead */ - Attached_dataspace(Dataspace_capability ds) - : _ds(_check(ds)), _local_addr(env()->rm_session()->attach(_ds)) { } + Attached_dataspace(Dataspace_capability ds) __attribute__((deprecated)) + : _ds(_check(ds)), _rm(*env_deprecated()->rm_session()), _local_addr(_rm.attach(_ds)) { } /** * Destructor @@ -72,7 +74,7 @@ class Genode::Attached_dataspace : Noncopyable ~Attached_dataspace() { if (_local_addr) - env()->rm_session()->detach(_local_addr); + _rm.detach(_local_addr); } /** diff --git a/repos/base/include/base/attached_io_mem_dataspace.h b/repos/base/include/base/attached_io_mem_dataspace.h index d2adeff029..e66603794a 100644 --- a/repos/base/include/base/attached_io_mem_dataspace.h +++ b/repos/base/include/base/attached_io_mem_dataspace.h @@ -70,10 +70,10 @@ class Genode::Attached_io_mem_dataspace * argument instead */ Attached_io_mem_dataspace(Genode::addr_t base, Genode::size_t size, - bool write_combined = false) + bool write_combined = false) __attribute__((deprecated)) : - _env_rm(*env()->rm_session()), - _mmio(base, size, write_combined), + _env_rm(*env_deprecated()->rm_session()), + _mmio(false, base, size, write_combined), _ds(_mmio.dataspace()), _local_addr(_env_rm.attach(_ds)) { diff --git a/repos/base/include/base/attached_ram_dataspace.h b/repos/base/include/base/attached_ram_dataspace.h index 5c79bc3e3d..3fd436da89 100644 --- a/repos/base/include/base/attached_ram_dataspace.h +++ b/repos/base/include/base/attached_ram_dataspace.h @@ -109,9 +109,9 @@ class Genode::Attached_ram_dataspace * 'Region_map &' arguments instead. */ Attached_ram_dataspace(Ram_session *ram, size_t size, - Cache_attribute cached = CACHED) + Cache_attribute cached = CACHED) __attribute__((deprecated)) : - _size(size), _ram(ram), _rm(env()->rm_session()), _cached(cached) + _size(size), _ram(ram), _rm(env_deprecated()->rm_session()), _cached(cached) { _alloc_and_attach(); } diff --git a/repos/base/include/base/attached_rom_dataspace.h b/repos/base/include/base/attached_rom_dataspace.h index 269d3691d9..bd9c2a41e6 100644 --- a/repos/base/include/base/attached_rom_dataspace.h +++ b/repos/base/include/base/attached_rom_dataspace.h @@ -78,8 +78,9 @@ class Genode::Attached_rom_dataspace * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Attached_rom_dataspace(char const *name) - : _rm(*env()->rm_session()), _rom(name) { _try_attach(); } + 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 diff --git a/repos/base/include/base/connection.h b/repos/base/include/base/connection.h index d09213a23a..e00221ac9b 100644 --- a/repos/base/include/base/connection.h +++ b/repos/base/include/base/connection.h @@ -175,7 +175,7 @@ class Genode::Connection : public Connection_base va_list list; va_start(list, format_args); - _session(*env()->parent(), Affinity(), format_args, list); + _session(*env_deprecated()->parent(), Affinity(), format_args, list); return Capability(); } diff --git a/repos/base/include/cap_session/connection.h b/repos/base/include/cap_session/connection.h index 0adf77eda3..9c81682400 100644 --- a/repos/base/include/cap_session/connection.h +++ b/repos/base/include/cap_session/connection.h @@ -24,6 +24,10 @@ 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 @@ -37,7 +41,7 @@ namespace Genode { struct Cap_connection; } */ struct Genode::Cap_connection : Pd_session_client { - Cap_connection() : Pd_session_client(env()->pd_session_cap()) { } -}; + 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 72e88bae62..4536c3845a 100644 --- a/repos/base/include/cpu_session/connection.h +++ b/repos/base/include/cpu_session/connection.h @@ -59,9 +59,9 @@ struct Genode::Cpu_connection : Connection, Cpu_session_client * argument instead */ Cpu_connection(const char *label = "", long priority = DEFAULT_PRIORITY, - Affinity const &affinity = Affinity()) + Affinity const &affinity = Affinity()) __attribute__((deprecated)) : - Connection(_session(*env()->parent(), label, priority, affinity)), + Connection(_session(*env_deprecated()->parent(), label, priority, affinity)), Cpu_session_client(cap()) { } }; diff --git a/repos/base/include/deprecated/env.h b/repos/base/include/deprecated/env.h index aa6d084182..94afd0b844 100644 --- a/repos/base/include/deprecated/env.h +++ b/repos/base/include/deprecated/env.h @@ -35,8 +35,22 @@ namespace Genode { /** * Return the interface to the component's environment + * + * \noapi + * \deprecated */ - extern Env_deprecated *env(); + extern Env_deprecated *env_deprecated(); + + /** + * Return the interface to the component's environment + * + * \deprecated + */ + static inline Env_deprecated *env() __attribute__((deprecated)); + static inline Env_deprecated *env() + { + return env_deprecated(); + } } diff --git a/repos/base/include/io_mem_session/connection.h b/repos/base/include/io_mem_session/connection.h index a06faf4e8b..7ac62ff531 100644 --- a/repos/base/include/io_mem_session/connection.h +++ b/repos/base/include/io_mem_session/connection.h @@ -54,9 +54,25 @@ struct Genode::Io_mem_connection : Connection, Io_mem_session_cl * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Io_mem_connection(addr_t base, size_t size, bool write_combined = false) + Io_mem_connection(addr_t base, size_t size, bool write_combined = false) __attribute__((deprecated)) : - Connection(_session(*env()->parent(), base, size, write_combined)), + 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)), 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 4e2bbf0aea..1a2af2edf2 100644 --- a/repos/base/include/io_port_session/connection.h +++ b/repos/base/include/io_port_session/connection.h @@ -53,9 +53,9 @@ struct Genode::Io_port_connection : Connection, * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Io_port_connection(unsigned base, unsigned size) + Io_port_connection(unsigned base, unsigned size) __attribute__((deprecated)) : - Connection(_session(*env()->parent(), base, size)), + Connection(_session(*env_deprecated()->parent(), 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 99eba15466..3c961ac6a1 100644 --- a/repos/base/include/irq_session/connection.h +++ b/repos/base/include/irq_session/connection.h @@ -65,9 +65,9 @@ struct Genode::Irq_connection : Connection, Irq_session_client 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) + Genode::addr_t device_config_phys = 0) __attribute__((deprecated)) : - Connection(_session(*Genode::env()->parent(), irq, + Connection(_session(*Genode::env_deprecated()->parent(), 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 905fd8b3a2..2ba3a210fc 100644 --- a/repos/base/include/log_session/connection.h +++ b/repos/base/include/log_session/connection.h @@ -43,7 +43,7 @@ struct Genode::Log_connection : Connection, Log_session_client * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Log_connection(Session_label label = Session_label()) + Log_connection(Session_label label = Session_label()) __attribute__((deprecated)) : Connection(session("ram_quota=%ld, label=\"%s\"", RAM_QUOTA, label.string())), diff --git a/repos/base/include/pd_session/connection.h b/repos/base/include/pd_session/connection.h index b94a88050a..849b3189d5 100644 --- a/repos/base/include/pd_session/connection.h +++ b/repos/base/include/pd_session/connection.h @@ -44,7 +44,7 @@ struct Genode::Pd_connection : Connection, Pd_session_client * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Pd_connection(char const *label = "") + Pd_connection(char const *label = "") __attribute__((deprecated)) : Connection(session("ram_quota=%u, label=\"%s\"", RAM_QUOTA, label)), Pd_session_client(cap()) diff --git a/repos/base/include/ram_session/connection.h b/repos/base/include/ram_session/connection.h index 21222271fc..57cea08dc4 100644 --- a/repos/base/include/ram_session/connection.h +++ b/repos/base/include/ram_session/connection.h @@ -57,9 +57,9 @@ struct Genode::Ram_connection : Connection, Ram_session_client * argument instead */ Ram_connection(const char *label = "", unsigned long phys_start = 0UL, - unsigned long phys_size = 0UL) + unsigned long phys_size = 0UL) __attribute__((deprecated)) : - Connection(_session(*env()->parent(), label, phys_start, phys_size)), + Connection(_session(*env_deprecated()->parent(), label, phys_start, phys_size)), Ram_session_client(cap()) { } }; diff --git a/repos/base/include/rm_session/connection.h b/repos/base/include/rm_session/connection.h index 9403eaa4f3..18b0dab43f 100644 --- a/repos/base/include/rm_session/connection.h +++ b/repos/base/include/rm_session/connection.h @@ -40,7 +40,7 @@ struct Genode::Rm_connection : Connection, Rm_session_client * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Rm_connection() + Rm_connection() __attribute__((deprecated)) : Connection(session("ram_quota=%u", RAM_QUOTA)), Rm_session_client(cap()) diff --git a/repos/base/include/rom_session/connection.h b/repos/base/include/rom_session/connection.h index 9a5f298624..2eed9c43cf 100644 --- a/repos/base/include/rom_session/connection.h +++ b/repos/base/include/rom_session/connection.h @@ -63,9 +63,33 @@ class Genode::Rom_connection : public Connection, * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Rom_connection(const char *label) + Rom_connection(const char *label) __attribute__((deprecated)) try : - Connection(_session(*env()->parent(), label)), + 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 (...) { diff --git a/repos/base/include/trace_session/connection.h b/repos/base/include/trace_session/connection.h index 90c63d2363..e0b2e66969 100644 --- a/repos/base/include/trace_session/connection.h +++ b/repos/base/include/trace_session/connection.h @@ -59,7 +59,7 @@ struct Genode::Trace::Connection : Genode::Connection, * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Connection(size_t ram_quota, size_t arg_buffer_size, unsigned parent_levels) + Connection(size_t ram_quota, size_t arg_buffer_size, unsigned parent_levels) __attribute__((deprecated)) : Genode::Connection(_session(*env()->parent(), ram_quota, arg_buffer_size, parent_levels)), diff --git a/repos/base/lib/symbols/ld b/repos/base/lib/symbols/ld index 167e67f9ac..26565e6283 100644 --- a/repos/base/lib/symbols/ld +++ b/repos/base/lib/symbols/ld @@ -193,7 +193,7 @@ _ZN6Genode3Log8_releaseEv T _ZN6Genode3Raw7_outputEv T _ZN6Genode3Raw8_acquireEv T _ZN6Genode3Raw8_releaseEv T -_ZN6Genode3envEv T +_ZN6Genode14env_deprecatedEv T _ZN6Genode4Heap11quota_limitEm T _ZN6Genode4Heap4freeEPvm T _ZN6Genode4Heap5allocEmPPv T diff --git a/repos/base/src/core/include/trace/control_area.h b/repos/base/src/core/include/trace/control_area.h index 2a19f24fa8..4b2816f66a 100644 --- a/repos/base/src/core/include/trace/control_area.h +++ b/repos/base/src/core/include/trace/control_area.h @@ -36,13 +36,13 @@ class Genode::Trace::Control_area static Ram_dataspace_capability _try_alloc(size_t size) { - try { return env()->ram_session()->alloc(size); } + try { return env_deprecated()->ram_session()->alloc(size); } catch (...) { return Ram_dataspace_capability(); } } static Trace::Control *_try_attach(Dataspace_capability ds) { - try { return env()->rm_session()->attach(ds); } + try { return env_deprecated()->rm_session()->attach(ds); } catch (...) { return 0; } } @@ -61,8 +61,8 @@ class Genode::Trace::Control_area ~Control_area() { - if (_local_base) env()->rm_session()->detach(_local_base); - if (_ds.valid()) env()->ram_session()->free(_ds); + if (_local_base) env_deprecated()->rm_session()->detach(_local_base); + if (_ds.valid()) env_deprecated()->ram_session()->free(_ds); } Dataspace_capability dataspace() const { return _ds; } diff --git a/repos/base/src/core/include/trace/session_component.h b/repos/base/src/core/include/trace/session_component.h index 9d2ab28a12..4c7d8bbf6a 100644 --- a/repos/base/src/core/include/trace/session_component.h +++ b/repos/base/src/core/include/trace/session_component.h @@ -57,13 +57,13 @@ class Genode::Trace::Session_component : ram(ram), ds(ram.alloc(size)), - base(env()->rm_session()->attach(ds)), + base(env_deprecated()->rm_session()->attach(ds)), size(ds.call()) { } ~Argument_buffer() { - env()->rm_session()->detach(base); + env_deprecated()->rm_session()->detach(base); ram.free(ds); } } _argument_buffer; diff --git a/repos/base/src/core/include/trace/subject_registry.h b/repos/base/src/core/include/trace/subject_registry.h index cdb920e04d..c56ca9ad49 100644 --- a/repos/base/src/core/include/trace/subject_registry.h +++ b/repos/base/src/core/include/trace/subject_registry.h @@ -102,13 +102,13 @@ class Genode::Trace::Subject _ds = ram.alloc(_size); /* copy content */ - void *src = env()->rm_session()->attach(from_ds), - *dst = env()->rm_session()->attach(_ds); + void *src = env_deprecated()->rm_session()->attach(from_ds), + *dst = env_deprecated()->rm_session()->attach(_ds); memcpy(dst, src, _size); - env()->rm_session()->detach(src); - env()->rm_session()->detach(dst); + env_deprecated()->rm_session()->detach(src); + env_deprecated()->rm_session()->detach(dst); return true; } diff --git a/repos/base/src/core/main.cc b/repos/base/src/core/main.cc index 20290f748f..5747f874d0 100644 --- a/repos/base/src/core/main.cc +++ b/repos/base/src/core/main.cc @@ -63,7 +63,7 @@ Core_env * Genode::core_env() } -Env_deprecated * Genode::env() { +Env_deprecated * Genode::env_deprecated() { return core_env(); } @@ -148,7 +148,7 @@ class Core_child : public Child_policy _core_ram_cap(core_ram_cap), _core_ram(core_ram), _core_cpu_cap(core_cpu_cap), _core_cpu(core_cpu), _ram_quota(Child::effective_ram_quota(ram_quota)), - _child(*env()->rm_session(), _entrypoint, *this) + _child(*env_deprecated()->rm_session(), _entrypoint, *this) { _entrypoint.activate(); } @@ -250,7 +250,7 @@ int main() * Allocate session meta data on distinct dataspaces to enable independent * destruction (to enable quota trading) of session component objects. */ - static Sliced_heap sliced_heap(env()->ram_session(), env()->rm_session()); + static Sliced_heap sliced_heap(env_deprecated()->ram_session(), env_deprecated()->rm_session()); /* * Factory for creating RPC capabilities within core @@ -303,7 +303,7 @@ int main() log("", ram_quota / (1024*1024), " MiB RAM assigned to init"); static Reconstructible - init(services, *env()->ram_session(), env()->ram_session_cap(), + init(services, *env_deprecated()->ram_session(), env_deprecated()->ram_session_cap(), ram_quota, core_cpu, core_cpu_cap); platform()->wait_for_exit(); diff --git a/repos/base/src/core/trace_session_component.cc b/repos/base/src/core/trace_session_component.cc index a8ddd60285..f3ce0fd6ab 100644 --- a/repos/base/src/core/trace_session_component.cc +++ b/repos/base/src/core/trace_session_component.cc @@ -151,7 +151,7 @@ Session_component::Session_component(Allocator &md_alloc, size_t ram_quota, char const *label, Source_registry &sources, Policy_registry &policies) : - _ram(*env()->ram_session()), + _ram(*env_deprecated()->ram_session()), _md_alloc(&md_alloc, ram_quota), _subjects_slab(&_md_alloc), _policies_slab(&_md_alloc), diff --git a/repos/base/src/include/base/internal/expanding_ram_session_client.h b/repos/base/src/include/base/internal/expanding_ram_session_client.h index 69ac703d3b..81c344720d 100644 --- a/repos/base/src/include/base/internal/expanding_ram_session_client.h +++ b/repos/base/src/include/base/internal/expanding_ram_session_client.h @@ -62,7 +62,7 @@ struct Genode::Expanding_ram_session_client : Upgradeable_clientparent()->resource_request(buf); + env_deprecated()->parent()->resource_request(buf); }, NUM_ATTEMPTS); } @@ -84,7 +84,7 @@ struct Genode::Expanding_ram_session_client : Upgradeable_clientparent()->resource_request(buf); + env_deprecated()->parent()->resource_request(buf); } return ret; } diff --git a/repos/base/src/include/base/internal/upgradeable_client.h b/repos/base/src/include/base/internal/upgradeable_client.h index 0c47b18dc9..6b8a8e7bbf 100644 --- a/repos/base/src/include/base/internal/upgradeable_client.h +++ b/repos/base/src/include/base/internal/upgradeable_client.h @@ -38,7 +38,7 @@ struct Genode::Upgradeable_client : CLIENT char buf[128]; snprintf(buf, sizeof(buf), "ram_quota=%lu", quota); - env()->parent()->upgrade(_id, buf); + env_deprecated()->parent()->upgrade(_id, buf); } }; diff --git a/repos/base/src/lib/base/component.cc b/repos/base/src/lib/base/component.cc index 6441a20d1c..afc190547e 100644 --- a/repos/base/src/lib/base/component.cc +++ b/repos/base/src/lib/base/component.cc @@ -34,7 +34,7 @@ namespace { { Genode::Entrypoint &_ep; - Genode::Parent &_parent = *env()->parent(); + Genode::Parent &_parent = *env_deprecated()->parent(); /** * Lock for serializing 'session' and 'close' @@ -63,25 +63,25 @@ namespace { Env(Genode::Entrypoint &ep) : _ep(ep) { env_ptr = this; } Genode::Parent &parent() override { return _parent; } - Genode::Ram_session &ram() override { return *Genode::env()->ram_session(); } - Genode::Cpu_session &cpu() override { return *Genode::env()->cpu_session(); } - Genode::Region_map &rm() override { return *Genode::env()->rm_session(); } - Genode::Pd_session &pd() override { return *Genode::env()->pd_session(); } + Genode::Ram_session &ram() override { return *Genode::env_deprecated()->ram_session(); } + Genode::Cpu_session &cpu() override { return *Genode::env_deprecated()->cpu_session(); } + Genode::Region_map &rm() override { return *Genode::env_deprecated()->rm_session(); } + Genode::Pd_session &pd() override { return *Genode::env_deprecated()->pd_session(); } Genode::Entrypoint &ep() override { return _ep; } Genode::Ram_session_capability ram_session_cap() override { - return Genode::env()->ram_session_cap(); + return Genode::env_deprecated()->ram_session_cap(); } Genode::Cpu_session_capability cpu_session_cap() override { - return Genode::env()->cpu_session_cap(); + return Genode::env_deprecated()->cpu_session_cap(); } Genode::Pd_session_capability pd_session_cap() override { - return Genode::env()->pd_session_cap(); + return Genode::env_deprecated()->pd_session_cap(); } Genode::Id_space &id_space() override diff --git a/repos/base/src/lib/base/entrypoint.cc b/repos/base/src/lib/base/entrypoint.cc index 790e8cb530..946854f3a3 100644 --- a/repos/base/src/lib/base/entrypoint.cc +++ b/repos/base/src/lib/base/entrypoint.cc @@ -15,7 +15,11 @@ /* Genode includes */ #include #include + +#define INCLUDED_BY_ENTRYPOINT_CC /* prevent "deprecated" warning */ #include +#undef INCLUDED_BY_ENTRYPOINT_CC + #include /* base-internal includes */ diff --git a/repos/base/src/lib/base/env_deprecated.cc b/repos/base/src/lib/base/env_deprecated.cc index 3c90670cc6..61dfbdc2ed 100644 --- a/repos/base/src/lib/base/env_deprecated.cc +++ b/repos/base/src/lib/base/env_deprecated.cc @@ -22,7 +22,7 @@ namespace Genode { /* * Request pointer to static environment of the Genode application */ - Env_deprecated *env() + Env_deprecated *env_deprecated() { /* * By placing the environment as static object here, we ensure that its diff --git a/repos/base/src/lib/base/log_console.cc b/repos/base/src/lib/base/log_console.cc index 443a235944..2d8cf8b9fa 100644 --- a/repos/base/src/lib/base/log_console.cc +++ b/repos/base/src/lib/base/log_console.cc @@ -30,7 +30,7 @@ class Log_console : public Console struct Log : Log_session_client { Session_capability _cap() { - return env()->parent()->session_cap(Parent::Env::log()); } + return env_deprecated()->parent()->session_cap(Parent::Env::log()); } Log() : Log_session_client(reinterpret_cap_cast(_cap())) { } diff --git a/repos/base/src/lib/base/rpc_cap_alloc.cc b/repos/base/src/lib/base/rpc_cap_alloc.cc index 25a33a9c42..591526e35f 100644 --- a/repos/base/src/lib/base/rpc_cap_alloc.cc +++ b/repos/base/src/lib/base/rpc_cap_alloc.cc @@ -26,8 +26,8 @@ Native_capability Rpc_entrypoint::_alloc_rpc_cap(Pd_session &pd, Untyped_capability new_obj_cap = retry( [&] () { return pd.alloc_rpc_cap(_cap); }, - [&] () { env()->parent()->upgrade(Parent::Env::pd(), - "ram_quota=16K"); }); + [&] () { env_deprecated()->parent()->upgrade(Parent::Env::pd(), + "ram_quota=16K"); }); return new_obj_cap; } diff --git a/repos/base/src/lib/base/signal.cc b/repos/base/src/lib/base/signal.cc index 7e0065c68c..547b27fe57 100644 --- a/repos/base/src/lib/base/signal.cc +++ b/repos/base/src/lib/base/signal.cc @@ -41,7 +41,7 @@ class Signal_handler_thread : Thread, Lock void entry() { - _signal_source.construct(env()->pd_session()->alloc_signal_source()); + _signal_source.construct(env_deprecated()->pd_session()->alloc_signal_source()); unlock(); Signal_receiver::dispatch_signals(&(*_signal_source)); } @@ -68,7 +68,7 @@ class Signal_handler_thread : Thread, Lock ~Signal_handler_thread() { - env()->pd_session()->free_signal_source(*_signal_source); + env_deprecated()->pd_session()->free_signal_source(*_signal_source); } }; @@ -232,7 +232,7 @@ Signal_context_capability Signal_receiver::manage(Signal_context *context) retry( [&] () { /* use signal context as imprint */ - context->_cap = env()->pd_session()->alloc_context(_cap, (long)context); + context->_cap = env_deprecated()->pd_session()->alloc_context(_cap, (long)context); }, [&] () { size_t const quota = 1024*sizeof(long); @@ -241,7 +241,7 @@ Signal_context_capability Signal_receiver::manage(Signal_context *context) log("upgrading quota donation for PD session (", quota, " bytes)"); - env()->parent()->upgrade(Parent::Env::pd(), buf); + env_deprecated()->parent()->upgrade(Parent::Env::pd(), buf); } ); diff --git a/repos/base/src/lib/base/signal_common.cc b/repos/base/src/lib/base/signal_common.cc index 2695af3831..07e8f4d2ba 100644 --- a/repos/base/src/lib/base/signal_common.cc +++ b/repos/base/src/lib/base/signal_common.cc @@ -190,7 +190,7 @@ void Signal_receiver::_unsynchronized_dissolve(Signal_context * const context) _platform_begin_dissolve(context); /* tell core to stop sending signals referring to the context */ - env()->pd_session()->free_context(context->_cap); + env_deprecated()->pd_session()->free_context(context->_cap); /* restore default initialization of signal context */ context->_receiver = 0; diff --git a/repos/base/src/lib/base/signal_submit.cc b/repos/base/src/lib/base/signal_submit.cc index 3e079a64d5..0eb853f954 100644 --- a/repos/base/src/lib/base/signal_submit.cc +++ b/repos/base/src/lib/base/signal_submit.cc @@ -27,5 +27,5 @@ void Signal_transmitter::submit(unsigned cnt) { Trace::Signal_submit trace_event(cnt); } - env()->pd_session()->submit(_context, cnt); + env_deprecated()->pd_session()->submit(_context, cnt); } diff --git a/repos/base/src/lib/base/thread.cc b/repos/base/src/lib/base/thread.cc index 189f3ef1e8..49b012b216 100644 --- a/repos/base/src/lib/base/thread.cc +++ b/repos/base/src/lib/base/thread.cc @@ -223,7 +223,7 @@ Thread::Thread(size_t weight, const char *name, size_t stack_size, if (_cpu_session) { Dataspace_capability ds = _cpu_session->trace_control(); if (ds.valid()) - _trace_control = env()->rm_session()->attach(ds); + _trace_control = env_deprecated()->rm_session()->attach(ds); } } @@ -262,5 +262,5 @@ Thread::~Thread() * detached trace control dataspace. */ if (_trace_control) - env()->rm_session()->detach(_trace_control); + env_deprecated()->rm_session()->detach(_trace_control); } diff --git a/repos/base/src/lib/base/thread_start.cc b/repos/base/src/lib/base/thread_start.cc index 43b2676496..8389487668 100644 --- a/repos/base/src/lib/base/thread_start.cc +++ b/repos/base/src/lib/base/thread_start.cc @@ -59,7 +59,7 @@ void Thread::_thread_start() void Thread::_deinit_platform_thread() { if (!_cpu_session) - _cpu_session = env()->cpu_session(); + _cpu_session = env_deprecated()->cpu_session(); _cpu_session->kill_thread(_thread_cap); } @@ -69,11 +69,11 @@ void Thread::start() { /* if no CPU session is given, use it from the environment */ if (!_cpu_session) - _cpu_session = env()->cpu_session(); + _cpu_session = env_deprecated()->cpu_session(); /* create thread at core */ addr_t const utcb = (addr_t)&_stack->utcb(); - _thread_cap = _cpu_session->create_thread(env()->pd_session_cap(), name(), + _thread_cap = _cpu_session->create_thread(env_deprecated()->pd_session_cap(), name(), _affinity, Weight(), utcb); if (!_thread_cap.valid()) throw Cpu_session::Thread_creation_failed(); diff --git a/repos/base/src/lib/base/trace.cc b/repos/base/src/lib/base/trace.cc index 24459a398b..1b2b3ca3e7 100644 --- a/repos/base/src/lib/base/trace.cc +++ b/repos/base/src/lib/base/trace.cc @@ -47,13 +47,13 @@ bool Trace::Logger::_evaluate_control() /* unload policy */ if (policy_module) { - env()->rm_session()->detach(policy_module); + env_deprecated()->rm_session()->detach(policy_module); policy_module = 0; } /* unmap trace buffer */ if (buffer) { - env()->rm_session()->detach(buffer); + env_deprecated()->rm_session()->detach(buffer); buffer = 0; } @@ -88,7 +88,7 @@ bool Trace::Logger::_evaluate_control() max_event_size = 0; policy_module = 0; - policy_module = env()->rm_session()->attach(policy_ds); + policy_module = env_deprecated()->rm_session()->attach(policy_ds); /* relocate function pointers of policy callback table */ for (unsigned i = 0; i < sizeof(Trace::Policy_module)/sizeof(void *); i++) { @@ -111,7 +111,7 @@ bool Trace::Logger::_evaluate_control() } try { - buffer = env()->rm_session()->attach(buffer_ds); + buffer = env_deprecated()->rm_session()->attach(buffer_ds); buffer->init(Dataspace_client(buffer_ds).size()); } catch (...) { } @@ -200,17 +200,17 @@ Trace::Logger *Thread::_logger() logger->init_pending(true); Thread_capability thread_cap = myself ? myself->_thread_cap - : env()->parent()->main_thread_cap(); + : env_deprecated()->parent()->main_thread_cap(); Genode::Cpu_session *cpu = myself ? myself->_cpu_session - : env()->cpu_session(); - if (!cpu) cpu = env()->cpu_session(); + : env_deprecated()->cpu_session(); + if (!cpu) cpu = env_deprecated()->cpu_session(); if (!myself) if (!main_trace_control) { - Dataspace_capability ds = env()->cpu_session()->trace_control(); + Dataspace_capability ds = env_deprecated()->cpu_session()->trace_control(); if (ds.valid()) - main_trace_control = env()->rm_session()->attach(ds); + main_trace_control = env_deprecated()->rm_session()->attach(ds); } logger->init(thread_cap, cpu, diff --git a/repos/base/src/lib/cxx/misc.cc b/repos/base/src/lib/cxx/misc.cc index b8a0376eb9..b13b74e925 100644 --- a/repos/base/src/lib/cxx/misc.cc +++ b/repos/base/src/lib/cxx/misc.cc @@ -113,7 +113,7 @@ extern "C" void *abort(void) /* Notify the parent of failure */ if (name != "main") - env()->parent()->exit(1); + env_deprecated()->parent()->exit(1); sleep_forever(); return 0; diff --git a/repos/base/src/lib/startup/_main.cc b/repos/base/src/lib/startup/_main.cc index c7d7a93346..fc4483e4fc 100644 --- a/repos/base/src/lib/startup/_main.cc +++ b/repos/base/src/lib/startup/_main.cc @@ -186,7 +186,7 @@ void genode_exit(int status) for (func = &_dtors_start; func != &_dtors_end; (*func++)()); /* inform parent about the exit status */ - Genode::env()->parent()->exit(status); + Genode::env_deprecated()->parent()->exit(status); /* wait for destruction by the parent */ Genode::sleep_forever(); diff --git a/repos/base/src/lib/startup/init_main_thread.cc b/repos/base/src/lib/startup/init_main_thread.cc index da5104ad2b..1d9305b2a6 100644 --- a/repos/base/src/lib/startup/init_main_thread.cc +++ b/repos/base/src/lib/startup/init_main_thread.cc @@ -97,7 +97,7 @@ extern "C" void init_main_thread() * Explicitly setup program environment at this point to ensure that its * destructor won't be registered for the atexit routine. */ - (void*)env(); + (void*)env_deprecated(); init_log(); /* create a thread object for the main thread */ diff --git a/repos/gems/include/gems/chunky_texture.h b/repos/gems/include/gems/chunky_texture.h index 46ae6df4b7..880ffe50b9 100644 --- a/repos/gems/include/gems/chunky_texture.h +++ b/repos/gems/include/gems/chunky_texture.h @@ -53,9 +53,25 @@ class Chunky_texture : Genode::Attached_ram_dataspace, public Genode::Texture(_pixel(), _alpha(size), size) + { } + + /** + * Constructor + * + * \deprecated + * \noapi + * + * This variant is solely meant to be used by deprecated functions. + * It will be removed if those functions are gone. + */ + Chunky_texture(Genode::Ram_session &ram, Genode::Surface_base::Area size) __attribute__((deprecated)) + : + Genode::Attached_ram_dataspace(ram, *Genode::env_deprecated()->rm_session(), _num_bytes(size)), Genode::Texture(_pixel(), _alpha(size), size) { } }; diff --git a/repos/os/include/audio_out_session/connection.h b/repos/os/include/audio_out_session/connection.h index 92b5534820..e12df105b5 100644 --- a/repos/os/include/audio_out_session/connection.h +++ b/repos/os/include/audio_out_session/connection.h @@ -62,10 +62,10 @@ struct Audio_out::Connection : Genode::Connection, Audio_out::Session_c */ Connection(const char *channel, bool alloc_signal = true, - bool progress_signal = false) + bool progress_signal = false) __attribute__((deprecated)) : - Genode::Connection(_session(*Genode::env()->parent(), channel)), - Session_client(*Genode::env()->rm_session(), cap(), alloc_signal, progress_signal) + Genode::Connection(_session(*Genode::env_deprecated()->parent(), channel)), + Session_client(*Genode::env_deprecated()->rm_session(), cap(), alloc_signal, progress_signal) { } }; diff --git a/repos/os/include/block/driver.h b/repos/os/include/block/driver.h index 9b4533a3a4..fc4198876a 100644 --- a/repos/os/include/block/driver.h +++ b/repos/os/include/block/driver.h @@ -54,13 +54,25 @@ class Block::Driver_session : public Driver_session_base, /** * Constructor * + * \param rm region map of local address space, used to attach + * the packet-stream buffer to the local address space * \param tx_ds dataspace used as communication buffer * for the tx packet stream * \param ep entry point used for packet-stream channel */ + Driver_session(Genode::Region_map &rm, + Genode::Dataspace_capability tx_ds, + Genode::Rpc_entrypoint &ep) + : Session_rpc_object(rm, tx_ds, ep) { } + + /** + * Constructor + * + * \deprecated + */ Driver_session(Genode::Dataspace_capability tx_ds, - Genode::Rpc_entrypoint &ep) - : Session_rpc_object(tx_ds, ep) { } + Genode::Rpc_entrypoint &ep) __attribute__((deprecated)) + : Session_rpc_object(*Genode::env_deprecated()->rm_session(), tx_ds, ep) { } }; diff --git a/repos/os/include/block_session/connection.h b/repos/os/include/block_session/connection.h index 66ada54a3d..2713e2ae20 100644 --- a/repos/os/include/block_session/connection.h +++ b/repos/os/include/block_session/connection.h @@ -59,10 +59,10 @@ struct Block::Connection : Genode::Connection, Session_client */ Connection(Genode::Range_allocator *tx_block_alloc, Genode::size_t tx_buf_size = 128*1024, - const char *label = "") + const char *label = "") __attribute__((deprecated)) : - Genode::Connection(_session(*Genode::env()->parent(), label, tx_buf_size)), - Session_client(cap(), *tx_block_alloc, *Genode::env()->rm_session()) + Genode::Connection(_session(*Genode::env_deprecated()->parent(), label, tx_buf_size)), + Session_client(cap(), *tx_block_alloc, *Genode::env_deprecated()->rm_session()) { } }; diff --git a/repos/os/include/block_session/rpc_object.h b/repos/os/include/block_session/rpc_object.h index b9f0a0a727..47db641754 100644 --- a/repos/os/include/block_session/rpc_object.h +++ b/repos/os/include/block_session/rpc_object.h @@ -36,9 +36,20 @@ class Block::Session_rpc_object : public Genode::Rpc_objectrm_session(), ep) { } + : _tx(tx_ds, local_rm, ep) { } + + /** + * Constructor + * + * \deprecated + * \noapi + */ + Session_rpc_object(Genode::Dataspace_capability tx_ds, + Genode::Rpc_entrypoint &ep) __attribute__((deprecated)) + : _tx(tx_ds, *Genode::env_deprecated()->rm_session(), ep) { } /** * Return capability to packet-stream channel diff --git a/repos/os/include/file_system_session/connection.h b/repos/os/include/file_system_session/connection.h index f54075d585..81f1ba1951 100644 --- a/repos/os/include/file_system_session/connection.h +++ b/repos/os/include/file_system_session/connection.h @@ -90,11 +90,11 @@ struct File_system::Connection_base : Genode::Connection, Session_clien size_t tx_buf_size = DEFAULT_TX_BUF_SIZE, char const *label = "", char const *root = "/", - bool writeable = true) + bool writeable = true) __attribute__((deprecated)) : - Genode::Connection(_session(*Genode::env()->parent(), label, + Genode::Connection(_session(*Genode::env_deprecated()->parent(), label, root, writeable, tx_buf_size)), - Session_client(cap(), tx_block_alloc, *Genode::env()->rm_session()) + Session_client(cap(), tx_block_alloc, *Genode::env_deprecated()->rm_session()) { } }; diff --git a/repos/os/include/framebuffer_session/connection.h b/repos/os/include/framebuffer_session/connection.h index 38202b5351..e5988017d9 100644 --- a/repos/os/include/framebuffer_session/connection.h +++ b/repos/os/include/framebuffer_session/connection.h @@ -85,9 +85,9 @@ class Framebuffer::Connection : public Genode::Connection, */ Connection(unsigned width = 0, unsigned height = 0, - Mode::Format format = Mode::INVALID) + Mode::Format format = Mode::INVALID) __attribute__((deprecated)) : - Genode::Connection(_connect(*Genode::env()->parent(), + Genode::Connection(_connect(*Genode::env_deprecated()->parent(), width, height, format)), Session_client(cap()) { } diff --git a/repos/os/include/gpio_session/connection.h b/repos/os/include/gpio_session/connection.h index 80c58a2f44..5da0d5ad16 100644 --- a/repos/os/include/gpio_session/connection.h +++ b/repos/os/include/gpio_session/connection.h @@ -40,7 +40,7 @@ struct Gpio::Connection : Genode::Connection, Session_client * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Connection(unsigned long gpio_pin) + Connection(unsigned long gpio_pin) __attribute__((deprecated)) : Genode::Connection(session("ram_quota=8K, gpio=%zd", gpio_pin)), Session_client(cap()) diff --git a/repos/os/include/input/component.h b/repos/os/include/input/component.h index 2635ea0a87..86ef305c46 100644 --- a/repos/os/include/input/component.h +++ b/repos/os/include/input/component.h @@ -51,9 +51,9 @@ class Input::Session_component : public Genode::Rpc_object * \noapi * \deprecated */ - Session_component() - : _ds(*Genode::env()->ram_session(), - *Genode::env()->rm_session(), + Session_component() __attribute__((deprecated)) + : _ds(*Genode::env_deprecated()->ram_session(), + *Genode::env_deprecated()->rm_session(), Event_queue::QUEUE_SIZE*sizeof(Input::Event)) { } diff --git a/repos/os/include/input_session/client.h b/repos/os/include/input_session/client.h index d93e019611..82b8d7b45d 100644 --- a/repos/os/include/input_session/client.h +++ b/repos/os/include/input_session/client.h @@ -33,17 +33,22 @@ class Input::Session_client : public Genode::Rpc_client public: - explicit Session_client(Genode::Env &env, - Session_capability session) + Session_client(Genode::Region_map &local_rm, Session_capability session) : Genode::Rpc_client(session), - _event_ds(env.rm(), call()) + _event_ds(local_rm, call()) { } - explicit Session_client(Session_capability session) + /** + * Constructor + * + * \deprecated + * \noapi + */ + explicit Session_client(Session_capability session) __attribute__((deprecated)) : Genode::Rpc_client(session), - _event_ds(*Genode::env()->rm_session(), call()) + _event_ds(*Genode::env_deprecated()->rm_session(), call()) { } Genode::Dataspace_capability dataspace() override { diff --git a/repos/os/include/input_session/connection.h b/repos/os/include/input_session/connection.h index 7c925eb7b6..c395f593cc 100644 --- a/repos/os/include/input_session/connection.h +++ b/repos/os/include/input_session/connection.h @@ -35,7 +35,7 @@ struct Input::Connection : Genode::Connection, Session_client Connection(Genode::Env &env, char const *label = "") : Genode::Connection(env, _session(env.parent(), label)), - Session_client(env, cap()) + Session_client(env.rm(), cap()) { } /** @@ -45,11 +45,11 @@ struct Input::Connection : Genode::Connection, Session_client * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Connection() + Connection() __attribute__((deprecated)) : Genode::Connection( - session(*Genode::env()->parent(), "ram_quota=16K")), - Session_client(cap()) + session(*Genode::env_deprecated()->parent(), "ram_quota=16K")), + Session_client(*Genode::env_deprecated()->rm_session(), cap()) { } }; diff --git a/repos/os/include/loader_session/connection.h b/repos/os/include/loader_session/connection.h index d903499b7e..4f68c2a09e 100644 --- a/repos/os/include/loader_session/connection.h +++ b/repos/os/include/loader_session/connection.h @@ -40,7 +40,7 @@ struct Loader::Connection : Genode::Connection, Session_client * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Connection(size_t ram_quota) + Connection(size_t ram_quota) __attribute__((deprecated)) : Genode::Connection(session("ram_quota=%ld", ram_quota)), Session_client(cap()) diff --git a/repos/os/include/nic_session/connection.h b/repos/os/include/nic_session/connection.h index 238bde4c10..1bbc0a3c57 100644 --- a/repos/os/include/nic_session/connection.h +++ b/repos/os/include/nic_session/connection.h @@ -68,11 +68,11 @@ struct Nic::Connection : Genode::Connection, Session_client Connection(Genode::Range_allocator *tx_block_alloc, Genode::size_t tx_buf_size, Genode::size_t rx_buf_size, - char const *label = "") + char const *label = "") __attribute__((deprecated)) : - Genode::Connection(_session(*Genode::env()->parent(), label, + Genode::Connection(_session(*Genode::env_deprecated()->parent(), label, tx_buf_size, rx_buf_size)), - Session_client(cap(), *tx_block_alloc, *Genode::env()->rm_session()) + Session_client(cap(), *tx_block_alloc, *Genode::env_deprecated()->rm_session()) { } }; diff --git a/repos/os/include/nic_session/rpc_object.h b/repos/os/include/nic_session/rpc_object.h index 0f8363f81c..acbfefc42f 100644 --- a/repos/os/include/nic_session/rpc_object.h +++ b/repos/os/include/nic_session/rpc_object.h @@ -41,13 +41,28 @@ class Nic::Session_rpc_object : public Genode::Rpc_objectrm_session(), ep), - _rx(rx_ds, *Genode::env()->rm_session(), *rx_buffer_alloc, ep) { } + _tx(tx_ds, rm, ep), + _rx(rx_ds, rm, *rx_buffer_alloc, ep) { } + + /** + * Constructor + * + * \deprecated + * \noapi + */ + Session_rpc_object(Genode::Dataspace_capability tx_ds, + Genode::Dataspace_capability rx_ds, + Genode::Range_allocator *rx_buffer_alloc, + Genode::Rpc_entrypoint &ep) __attribute__((deprecated)) + : + _tx(tx_ds, *Genode::env_deprecated()->rm_session(), ep), + _rx(rx_ds, *Genode::env_deprecated()->rm_session(), *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 01880a825a..7eaa24417b 100644 --- a/repos/os/include/nitpicker_session/client.h +++ b/repos/os/include/nitpicker_session/client.h @@ -31,10 +31,26 @@ class Nitpicker::Session_client : public Genode::Rpc_client public: - explicit Session_client(Session_capability session) + /** + * Constructor + */ + Session_client(Genode::Region_map &rm, Session_capability session) : Rpc_client(session), - _command_ds(command_dataspace()), + _command_ds(rm, command_dataspace()), + _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()) { } diff --git a/repos/os/include/nitpicker_session/connection.h b/repos/os/include/nitpicker_session/connection.h index ed20cff278..a184e1b98c 100644 --- a/repos/os/include/nitpicker_session/connection.h +++ b/repos/os/include/nitpicker_session/connection.h @@ -66,11 +66,11 @@ class Nitpicker::Connection : public Genode::Connection, : /* establish nitpicker session */ Genode::Connection(env, _connect(env.parent(), label)), - Session_client(cap()), + Session_client(env.rm(), cap()), /* request frame-buffer and input sub sessions */ _framebuffer(framebuffer_session()), - _input(env, input_session()) + _input(env.rm(), input_session()) { } /** @@ -80,15 +80,15 @@ class Nitpicker::Connection : public Genode::Connection, * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Connection(char const *label = "") + Connection(char const *label = "") __attribute__((deprecated)) : /* establish nitpicker session */ - Genode::Connection(_connect(*Genode::env()->parent(), label)), - Session_client(cap()), + 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(input_session()) + _input(*Genode::env_deprecated()->rm_session(), input_session()) { } void buffer(Framebuffer::Mode mode, bool use_alpha) diff --git a/repos/os/include/os/reporter.h b/repos/os/include/os/reporter.h index 55c6411c2c..806b95a0e5 100644 --- a/repos/os/include/os/reporter.h +++ b/repos/os/include/os/reporter.h @@ -41,10 +41,10 @@ class Genode::Reporter : Noncopyable struct Connection { Report::Connection report; - Attached_dataspace ds = { report.dataspace() }; + Attached_dataspace ds = { *env_deprecated()->rm_session(), report.dataspace() }; Connection(char const *name, size_t buffer_size) - : report(name, buffer_size) { } + : report(false, name, buffer_size) { } }; Constructible _conn; @@ -61,13 +61,26 @@ class Genode::Reporter : Noncopyable public: - Reporter(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), + _buffer_size(buffer_size) + { } + /** * Enable or disable reporting */ diff --git a/repos/os/include/platform_session/connection.h b/repos/os/include/platform_session/connection.h index 17aab4826e..f02780806d 100644 --- a/repos/os/include/platform_session/connection.h +++ b/repos/os/include/platform_session/connection.h @@ -37,7 +37,7 @@ struct Platform::Connection : Genode::Connection, Client * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Connection() + Connection() __attribute__((deprecated)) : Genode::Connection(session("ram_quota=4K")), Client(cap()) { } }; diff --git a/repos/os/include/regulator_session/connection.h b/repos/os/include/regulator_session/connection.h index 44aa758498..14f51d9e12 100644 --- a/repos/os/include/regulator_session/connection.h +++ b/repos/os/include/regulator_session/connection.h @@ -54,9 +54,9 @@ struct Regulator::Connection : Genode::Connection, Session_client * \param regulator identifier for the specific regulator * \param label string identifier of the client */ - Connection(Regulator_id regulator, const char * label = "") + Connection(Regulator_id regulator, const char * label = "") __attribute__((deprecated)) : - Genode::Connection(_session(*Genode::env()->parent(), label, regulator)), + Genode::Connection(_session(*Genode::env_deprecated()->parent(), label, regulator)), Session_client(cap()) { } }; diff --git a/repos/os/include/report_session/connection.h b/repos/os/include/report_session/connection.h index 5c1563ee54..1498a012e3 100644 --- a/repos/os/include/report_session/connection.h +++ b/repos/os/include/report_session/connection.h @@ -52,9 +52,24 @@ struct Report::Connection : Genode::Connection, Session_client * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Connection(char const *label, size_t buffer_size = 4096) + Connection(char const *label, size_t buffer_size = 4096) __attribute__((deprecated)) : - Genode::Connection(_session(*Genode::env()->parent(), label, buffer_size)), + 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)), Session_client(cap()) { } }; diff --git a/repos/os/include/rtc_session/connection.h b/repos/os/include/rtc_session/connection.h index d394d998ea..4836f0cd83 100644 --- a/repos/os/include/rtc_session/connection.h +++ b/repos/os/include/rtc_session/connection.h @@ -39,7 +39,7 @@ struct Rtc::Connection : Genode::Connection, Session_client * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Connection() + Connection() __attribute__((deprecated)) : Genode::Connection(session("ram_quota=4K")), Session_client(cap()) 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 1fcf3022d2..e95181e5e1 100644 --- a/repos/os/include/spec/imx53/imx_framebuffer_session/connection.h +++ b/repos/os/include/spec/imx53/imx_framebuffer_session/connection.h @@ -80,8 +80,8 @@ class Framebuffer::Imx_connection : public Genode::Connection, */ Imx_connection(unsigned width = 0, unsigned height = 0, - Mode::Format format = Mode::INVALID) - : Genode::Connection(_connect(*Genode::env()->parent(), + Mode::Format format = Mode::INVALID) __attribute__((deprecated)) + : Genode::Connection(_connect(*Genode::env_deprecated()->parent(), width, height, format)), Imx_client(cap()) { } }; diff --git a/repos/os/include/spec/x86/platform_session/connection.h b/repos/os/include/spec/x86/platform_session/connection.h index 4f50bcddb3..bff4af260f 100644 --- a/repos/os/include/spec/x86/platform_session/connection.h +++ b/repos/os/include/spec/x86/platform_session/connection.h @@ -37,7 +37,7 @@ struct Platform::Connection : Genode::Connection, Client * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Connection() + Connection() __attribute__((deprecated)) : Genode::Connection(session("ram_quota=16K")), Client(cap()) diff --git a/repos/os/include/terminal_session/client.h b/repos/os/include/terminal_session/client.h index 32b868acae..ecebc69c71 100644 --- a/repos/os/include/terminal_session/client.h +++ b/repos/os/include/terminal_session/client.h @@ -40,10 +40,16 @@ class Terminal::Session_client : public Genode::Rpc_client public: - Session_client(Genode::Capability cap) + Session_client(Genode::Region_map &local_rm, Genode::Capability cap) : Genode::Rpc_client(cap), - _io_buffer(call()) + _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() { return call(); } diff --git a/repos/os/include/terminal_session/connection.h b/repos/os/include/terminal_session/connection.h index 5fbebe2696..dd682e55e9 100644 --- a/repos/os/include/terminal_session/connection.h +++ b/repos/os/include/terminal_session/connection.h @@ -52,7 +52,7 @@ struct Terminal::Connection : Genode::Connection, Session_client Genode::Connection(env, session(env.parent(), "ram_quota=%ld, label=\"%s\"", 2*4096, label)), - Session_client(cap()) + Session_client(env.rm(), cap()) { wait_for_connection(cap()); } @@ -64,11 +64,11 @@ struct Terminal::Connection : Genode::Connection, Session_client * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Connection(char const *label = "") + Connection(char const *label = "") __attribute__((deprecated)) : Genode::Connection(session("ram_quota=%zd, label=\"%s\"", 2*4096, label)), - Session_client(cap()) + Session_client(*Genode::env_deprecated()->rm_session(), cap()) { wait_for_connection(cap()); } diff --git a/repos/os/include/timer_session/connection.h b/repos/os/include/timer_session/connection.h index 7bce2ed144..e7a81f3b49 100644 --- a/repos/os/include/timer_session/connection.h +++ b/repos/os/include/timer_session/connection.h @@ -54,7 +54,7 @@ class Timer::Connection : public Genode::Connection, public Session_cli * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Connection() + Connection() __attribute__((deprecated)) : Genode::Connection(session("ram_quota=8K")), Session_client(cap()) diff --git a/repos/os/include/uart_session/client.h b/repos/os/include/uart_session/client.h index 1a41f3ccf2..9106d24073 100644 --- a/repos/os/include/uart_session/client.h +++ b/repos/os/include/uart_session/client.h @@ -29,9 +29,14 @@ class Uart::Session_client : public Genode::Rpc_client public: - Session_client(Genode::Capability cap) + Session_client(Genode::Region_map &local_rm, Genode::Capability cap) : - Genode::Rpc_client(cap), _terminal(cap) + 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) { } diff --git a/repos/os/include/uart_session/connection.h b/repos/os/include/uart_session/connection.h index 5816e4f1df..592ed542da 100644 --- a/repos/os/include/uart_session/connection.h +++ b/repos/os/include/uart_session/connection.h @@ -28,7 +28,7 @@ struct Uart::Connection : Genode::Connection, Session_client Connection(Genode::Env &env) : Genode::Connection(env, session(env.parent(), "ram_quota=%ld", 2*4096)), - Session_client(cap()) + Session_client(env.rm(), cap()) { Terminal::Connection::wait_for_connection(cap()); } @@ -40,10 +40,10 @@ struct Uart::Connection : Genode::Connection, Session_client * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Connection() + Connection() __attribute__((deprecated)) : Genode::Connection(session("ram_quota=%ld", 2*4096)), - Session_client(cap()) + Session_client(*Genode::env_deprecated()->rm_session(), cap()) { Terminal::Connection::wait_for_connection(cap()); } diff --git a/repos/os/include/usb_session/connection.h b/repos/os/include/usb_session/connection.h index aa8cc73753..09f78c8e83 100644 --- a/repos/os/include/usb_session/connection.h +++ b/repos/os/include/usb_session/connection.h @@ -60,10 +60,10 @@ struct Usb::Connection : Genode::Connection, Session_client char const *label = "", Genode::size_t tx_buf_size = 512 * 1024, Genode::Signal_context_capability sigh_state_changed = - Genode::Signal_context_capability()) + Genode::Signal_context_capability()) __attribute__((deprecated)) : - Genode::Connection(_session(*Genode::env()->parent(), label, tx_buf_size)), - Session_client(cap(), *tx_block_alloc, *Genode::env()->rm_session(), sigh_state_changed) + 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) { } }; diff --git a/repos/os/src/lib/config/config.cc b/repos/os/src/lib/config/config.cc index b77bb410a8..f1d2e832f2 100644 --- a/repos/os/src/lib/config/config.cc +++ b/repos/os/src/lib/config/config.cc @@ -2,6 +2,8 @@ * \brief Access to process configuration * \author Norman Feske * \date 2010-05-04 + * + * \deprecated */ /* @@ -20,7 +22,7 @@ Xml_node _config_xml_node(Dataspace_capability config_ds) if (!config_ds.valid()) throw Exception(); - return Xml_node(env()->rm_session()->attach(config_ds), + return Xml_node(env_deprecated()->rm_session()->attach(config_ds), Genode::Dataspace_client(config_ds).size()); } @@ -42,7 +44,7 @@ void Config::reload() try { /* re-acquire dataspace from ROM session */ if (_config_ds.valid()) - env()->rm_session()->detach(_config_xml.addr()); + env_deprecated()->rm_session()->detach(_config_xml.addr()); _config_ds = _config_rom.dataspace(); @@ -74,7 +76,7 @@ void Config::sigh(Signal_context_capability cap) Config::Config() : - _config_rom("config"), + _config_rom(false, "config"), _config_ds(_config_rom.dataspace()), _config_xml(_config_xml_node(_config_ds)) { } diff --git a/repos/ports/include/noux_session/connection.h b/repos/ports/include/noux_session/connection.h index e0985c940c..470dc3600e 100644 --- a/repos/ports/include/noux_session/connection.h +++ b/repos/ports/include/noux_session/connection.h @@ -38,7 +38,7 @@ struct Noux::Connection : Genode::Connection, Session_client * \deprecated Use the constructor with 'Env &' as first * argument instead */ - Connection() + Connection() __attribute__((deprecated)) : Genode::Connection(session("")), Session_client(cap()) { } /**