From fb744e7423d9d09d9ac34207071fa330d32d36c3 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Fri, 13 Jan 2017 15:20:30 +0100 Subject: [PATCH] loader: API transition (fix 'deprecated' warnings) Issue #1987 --- repos/os/src/server/loader/input.h | 4 ++-- repos/os/src/server/loader/main.cc | 11 ++++++----- repos/os/src/server/loader/nitpicker.h | 6 ++++-- repos/os/src/server/loader/rom.h | 10 ++++++++-- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/repos/os/src/server/loader/input.h b/repos/os/src/server/loader/input.h index dc4a478cd1..0ee1876dab 100644 --- a/repos/os/src/server/loader/input.h +++ b/repos/os/src/server/loader/input.h @@ -11,7 +11,7 @@ */ /* - * Copyright (C) 2010-2013 Genode Labs GmbH + * Copyright (C) 2010-2017 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU General Public License version 2. @@ -55,7 +55,7 @@ class Input::Session_component : public Rpc_object Session_capability real_input, Motion_delta &motion_delta) : - _real_input(real_input), _motion_delta(motion_delta), + _real_input(rm, real_input), _motion_delta(motion_delta), _ev_ds(rm, _real_input.dataspace()), _ev_buf(_ev_ds.local_addr()) { } diff --git a/repos/os/src/server/loader/main.cc b/repos/os/src/server/loader/main.cc index d26797a39e..0ee8d869bc 100644 --- a/repos/os/src/server/loader/main.cc +++ b/repos/os/src/server/loader/main.cc @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2010-2016 Genode Labs GmbH + * Copyright (C) 2010-2017 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU General Public License version 2. @@ -160,6 +160,7 @@ class Loader::Session_component : public Rpc_object struct Local_nitpicker_factory : Local_service::Factory { Entrypoint &_ep; + Env &_env; Region_map &_rm; Ram_session &_ram; @@ -170,8 +171,8 @@ class Loader::Session_component : public Rpc_object Constructible session; - Local_nitpicker_factory(Entrypoint &ep, Region_map &rm, Ram_session &ram) - : _ep(ep), _rm(rm), _ram(ram) { } + Local_nitpicker_factory(Entrypoint &ep, Env &env, Region_map &rm, Ram_session &ram) + : _ep(ep), _env(env), _rm(rm), _ram(ram) { } void constrain_geometry(Area size) { _max_size = size; } @@ -187,7 +188,7 @@ class Loader::Session_component : public Rpc_object throw Parent::Service_denied(); } - session.construct(_ep, _rm, _ram, _max_size, + session.construct(_ep, _env, _rm, _ram, _max_size, _parent_view, view_ready_sigh, args.string()); return *session; } @@ -213,7 +214,7 @@ class Loader::Session_component : public Rpc_object Local_rom_service _rom_service { _rom_factory }; Local_cpu_service _cpu_service { _env }; Local_pd_service _pd_service { _env }; - Local_nitpicker_factory _nitpicker_factory { _env.ep(), _env.rm(), _local_ram }; + Local_nitpicker_factory _nitpicker_factory { _env.ep(), _env, _env.rm(), _local_ram }; Local_nitpicker_service _nitpicker_service { _nitpicker_factory }; Signal_context_capability _fault_sigh; Constructible _child; diff --git a/repos/os/src/server/loader/nitpicker.h b/repos/os/src/server/loader/nitpicker.h index 72344c271f..bab22d3e07 100644 --- a/repos/os/src/server/loader/nitpicker.h +++ b/repos/os/src/server/loader/nitpicker.h @@ -6,7 +6,7 @@ */ /* - * Copyright (C) 2009-2013 Genode Labs GmbH + * Copyright (C) 2009-2017 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU General Public License version 2. @@ -150,6 +150,7 @@ class Nitpicker::Session_component : public Rpc_object * Constructor */ Session_component(Entrypoint &ep, + Env &env, Region_map &rm, Ram_session &ram, Area max_size, @@ -160,6 +161,7 @@ class Nitpicker::Session_component : public Rpc_object _view_ready_sigh(view_ready_sigh), _ep(ep), _max_size(max_size), + _nitpicker(env), /* import parent view */ _parent_view_handle(_nitpicker.view_handle(parent_view)), @@ -169,7 +171,7 @@ class Nitpicker::Session_component : public Rpc_object _proxy_input(rm, _nitpicker.input_session(), _motion_delta), - _command_ds(&ram, sizeof(Command_buffer)) + _command_ds(ram, env.rm(), sizeof(Command_buffer)) { _ep.manage(_proxy_input); _ep.manage(*this); diff --git a/repos/os/src/server/loader/rom.h b/repos/os/src/server/loader/rom.h index 1ff92184bb..d1788cf6a3 100644 --- a/repos/os/src/server/loader/rom.h +++ b/repos/os/src/server/loader/rom.h @@ -4,10 +4,16 @@ * \date 2012-04-17 */ +/* + * 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 General Public License version 2. + */ + #ifndef _ROM_H_ #define _ROM_H_ -//#include #include #include #include @@ -45,7 +51,7 @@ namespace Genode { Ram_session &ram_session, Origin origin) : _name(name), _ram(ram_session), - _fg(&_ram, 0), _bg(&_ram, 0), + _fg(_ram, env.rm(), 0), _bg(_ram, env.rm(), 0), _bg_has_pending_data(false), _lock(Lock::LOCKED) {