From 4f69772ecca4cdb03d330cb3709c7e1e35607f8e Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 27 Apr 2016 22:11:38 +0200 Subject: [PATCH] Replace 'Env' interface with modern one The original 'Env' interface as returned by 'Genode::env()' has been renamed to 'Env_deprecated' and moved to deprecated/env.h. The new version of base/env.h contains the interface passed to modern components that use the component API via base/component.h. Issue #1832 --- repos/base-linux/src/core/include/core_env.h | 6 +- .../src/include/base/internal/platform_env.h | 14 +- .../base-linux/src/lib/lx_hybrid/lx_hybrid.cc | 6 +- .../src/test/lx_hybrid_ctors/main.cc | 2 +- .../src/test/lx_hybrid_errno/main.cc | 2 +- .../src/test/lx_hybrid_exception/main.cc | 2 +- .../src/test/lx_hybrid_pthread_ipc/main.cc | 2 +- repos/base/include/base/component.h | 64 +++------ repos/base/include/base/entrypoint.h | 8 +- repos/base/include/base/env.h | 103 ++++----------- repos/base/include/deprecated/env.h | 125 ++++++++++++++++++ repos/base/src/base/component/component.cc | 6 +- repos/base/src/base/entrypoint/entrypoint.cc | 10 +- repos/base/src/base/env/env.cc | 2 +- repos/base/src/core/include/core_env.h | 2 +- repos/base/src/core/main.cc | 2 +- .../src/include/base/internal/platform_env.h | 9 +- repos/base/src/ld/genode_dyn.ld | 4 +- repos/base/src/lib/ldso/main.cc | 6 +- .../src/lib/startup/component_construct.cc | 10 +- .../src/lib/startup/component_entry_point.cc | 4 +- repos/libports/src/lib/libc/task.cc | 12 +- .../drivers/framebuffer/spec/sdl/fb_sdl.cc | 10 +- repos/os/src/lib/server/server.cc | 4 +- 24 files changed, 227 insertions(+), 188 deletions(-) create mode 100644 repos/base/include/deprecated/env.h diff --git a/repos/base-linux/src/core/include/core_env.h b/repos/base-linux/src/core/include/core_env.h index 711366f34..1a630119e 100644 --- a/repos/base-linux/src/core/include/core_env.h +++ b/repos/base-linux/src/core/include/core_env.h @@ -197,9 +197,9 @@ namespace Genode { Entrypoint *entrypoint() { return &_entrypoint; } - /******************* - ** Env interface ** - *******************/ + /****************************** + ** Env_deprecated interface ** + ******************************/ Parent *parent() override { return &_core_parent; } Ram_session *ram_session() override { return &_ram_session; } 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 a4660020f..c273d0f02 100644 --- a/repos/base-linux/src/include/base/internal/platform_env.h +++ b/repos/base-linux/src/include/base/internal/platform_env.h @@ -60,7 +60,7 @@ struct Genode::Expanding_cpu_session_client * Common base class of the 'Platform_env' implementations for core and * non-core processes. */ -class Genode::Platform_env_base : public Env +class Genode::Platform_env_base : public Env_deprecated { private: @@ -389,9 +389,9 @@ class Genode::Platform_env_base : public Env { } - /******************* - ** Env interface ** - *******************/ + /****************************** + ** Env_deprecated interface ** + ******************************/ Ram_session *ram_session() override { return &_ram_session_client; } Ram_session_capability ram_session_cap() override { return _ram_session_cap; } @@ -499,9 +499,9 @@ class Genode::Platform_env : public Platform_env_base, public Emergency_ram_rese void release() { ram_session()->free(_emergency_ram_ds); } - /******************* - ** Env interface ** - *******************/ + /****************************** + ** Env_deprecated interface ** + ******************************/ Parent *parent() override { return &_parent(); } Heap *heap() override { return &_heap; } diff --git a/repos/base-linux/src/lib/lx_hybrid/lx_hybrid.cc b/repos/base-linux/src/lib/lx_hybrid/lx_hybrid.cc index 9cc10e464..b0ff9364d 100644 --- a/repos/base-linux/src/lib/lx_hybrid/lx_hybrid.cc +++ b/repos/base-linux/src/lib/lx_hybrid/lx_hybrid.cc @@ -86,15 +86,15 @@ namespace Genode { * component's entrypoint is activated. */ - extern void (*call_component_construct)(Genode::Environment &) __attribute__((weak)); + extern void (*call_component_construct)(Genode::Env &) __attribute__((weak)); } -static void lx_hybrid_component_construct(Genode::Environment &env) +static void lx_hybrid_component_construct(Genode::Env &env) { Component::construct(env); } -void (*Genode::call_component_construct)(Genode::Environment &) = &lx_hybrid_component_construct; +void (*Genode::call_component_construct)(Genode::Env &) = &lx_hybrid_component_construct; /* * Static constructors are handled by the Linux startup code - so implement diff --git a/repos/base-linux/src/test/lx_hybrid_ctors/main.cc b/repos/base-linux/src/test/lx_hybrid_ctors/main.cc index e91b30251..7976a2154 100644 --- a/repos/base-linux/src/test/lx_hybrid_ctors/main.cc +++ b/repos/base-linux/src/test/lx_hybrid_ctors/main.cc @@ -51,7 +51,7 @@ char const * Component::name() { return "lx_hybrid_ctors"; } /* * Component implements classical main function in construct. */ -void Component::construct(Genode::Environment &env) +void Component::construct(Genode::Env &env) { printf("--- lx_hybrid global static constructor test ---\n"); diff --git a/repos/base-linux/src/test/lx_hybrid_errno/main.cc b/repos/base-linux/src/test/lx_hybrid_errno/main.cc index cf9549949..b4c0ab5dd 100644 --- a/repos/base-linux/src/test/lx_hybrid_errno/main.cc +++ b/repos/base-linux/src/test/lx_hybrid_errno/main.cc @@ -55,7 +55,7 @@ struct Unexpected_errno_change { }; /* * Component implements classical main function in construct. */ -void Component::construct(Genode::Environment &env) +void Component::construct(Genode::Env &env) { Genode::printf("--- thread-local errno test ---\n"); diff --git a/repos/base-linux/src/test/lx_hybrid_exception/main.cc b/repos/base-linux/src/test/lx_hybrid_exception/main.cc index aada945a8..6271fb4c0 100644 --- a/repos/base-linux/src/test/lx_hybrid_exception/main.cc +++ b/repos/base-linux/src/test/lx_hybrid_exception/main.cc @@ -34,7 +34,7 @@ char const * Component::name() { return "lx_hybrid_exception"; } /* * Component implements classical main function in construct. */ -void Component::construct(Genode::Environment &env) +void Component::construct(Genode::Env &env) { printf("--- lx_hybrid exception test ---\n"); diff --git a/repos/base-linux/src/test/lx_hybrid_pthread_ipc/main.cc b/repos/base-linux/src/test/lx_hybrid_pthread_ipc/main.cc index 3aa3f487d..50282f4d6 100644 --- a/repos/base-linux/src/test/lx_hybrid_pthread_ipc/main.cc +++ b/repos/base-linux/src/test/lx_hybrid_pthread_ipc/main.cc @@ -60,7 +60,7 @@ char const * Component::name() { return "lx_hybrid_pthread_ipc"; } /* * Component implements classical main function in construct. */ -void Component::construct(Genode::Environment &env) +void Component::construct(Genode::Env &env) { Genode::printf("--- pthread IPC test ---\n"); diff --git a/repos/base/include/base/component.h b/repos/base/include/base/component.h index a7e2f8491..66975a163 100644 --- a/repos/base/include/base/component.h +++ b/repos/base/include/base/component.h @@ -14,16 +14,10 @@ #ifndef _INCLUDE__BASE__COMPONENT_H_ #define _INCLUDE__BASE__COMPONENT_H_ +#include #include -#include -#include -#include -#include -#include -#include - -namespace Genode { struct Environment; } +namespace Genode { struct Env; } /** @@ -31,48 +25,22 @@ namespace Genode { struct Environment; } */ namespace Component { + /** + * Return stack size of the component's initial entrypoint + */ Genode::size_t stack_size(); + + /** + * Return component name + */ char const *name(); - void construct(Genode::Environment &); + + /** + * Construct component + * + * \param env interface to the component's execution environment + */ + void construct(Genode::Env &env); } - -struct Genode::Environment -{ - 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() = 0; - - /** - * CPU session of the component - * - * This session is used to create the threads of the component. - */ - virtual Cpu_session &cpu() = 0; - - /** - * Region map of the component's address space - */ - virtual Region_map &rm() = 0; - - /** - * PD session of the component as created by the parent - */ - virtual Pd_session &pd() = 0; - - /** - * Entrypoint for handling RPC requests and signals - */ - virtual Entrypoint &ep() = 0; - - virtual Ram_session_capability ram_session_cap() = 0; - virtual Cpu_session_capability cpu_session_cap() = 0; -}; - #endif /* _INCLUDE__BASE__COMPONENT_H_ */ diff --git a/repos/base/include/base/entrypoint.h b/repos/base/include/base/entrypoint.h index cbb004434..30a327b95 100644 --- a/repos/base/include/base/entrypoint.h +++ b/repos/base/include/base/entrypoint.h @@ -24,7 +24,7 @@ namespace Genode { class Startup; class Entrypoint; - class Environment; + class Env; } @@ -67,7 +67,7 @@ class Genode::Entrypoint : Genode::Noncopyable void entry() override { ep._process_incoming_signals(); } }; - Environment &_env; + Env &_env; Volatile_object _rpc_ep; @@ -100,11 +100,11 @@ class Genode::Entrypoint : Genode::Noncopyable /** * Called by the startup code only */ - Entrypoint(Environment &env); + Entrypoint(Env &env); public: - Entrypoint(Environment &env, size_t stack_size, char const *name); + Entrypoint(Env &env, size_t stack_size, char const *name); /** * Associate RPC object with the entry point diff --git a/repos/base/include/base/env.h b/repos/base/include/base/env.h index be18e1e7e..8ce8820ed 100644 --- a/repos/base/include/base/env.h +++ b/repos/base/include/base/env.h @@ -1,11 +1,11 @@ /* - * \brief Environment of a component + * \brief Component environment * \author Norman Feske - * \date 2006-07-01 + * \date 2015-12-17 */ /* - * Copyright (C) 2006-2013 Genode Labs GmbH + * Copyright (C) 2015 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. @@ -14,111 +14,56 @@ #ifndef _INCLUDE__BASE__ENV_H_ #define _INCLUDE__BASE__ENV_H_ -#include #include -#include -#include /* deprecated, kept for API compatibility only */ -#include -#include +#include +#include #include -#include -#include -#include -#include +#include +#include -namespace Genode { - - struct Env; - - /** - * Return the interface to the component's environment - */ - extern Env *env(); -} +/* maintain compatibility to deprecated API */ +#include + + +namespace Genode { struct Env; } -/** - * Component runtime environment - * - * The environment of a Genode component is defined by its parent. The 'Env' - * class allows the component to interact with its environment. It is - * initialized at the startup of the component. - */ struct Genode::Env { - virtual ~Env() { } - - /** - * Communication channel to our parent - */ - virtual Parent *parent() = 0; + 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. + * 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() = 0; - virtual Ram_session_capability ram_session_cap() = 0; + virtual Ram_session &ram() = 0; /** * CPU session of the component * * This session is used to create the threads of the component. */ - virtual Cpu_session *cpu_session() = 0; - virtual Cpu_session_capability cpu_session_cap() = 0; + virtual Cpu_session &cpu() = 0; /** - * Region-manager session of the component as created by the parent - * - * \deprecated This function exists for API compatibility only. - * The functionality of the former RM service is now - * provided by the 'Region_map' interface. + * Region map of the component's address space */ - virtual Region_map *rm_session() = 0; + virtual Region_map &rm() = 0; /** * PD session of the component as created by the parent */ - virtual Pd_session *pd_session() = 0; - virtual Pd_session_capability pd_session_cap() = 0; + virtual Pd_session &pd() = 0; /** - * Heap backed by the RAM session of the environment + * Entrypoint for handling RPC requests and signals */ - virtual Allocator *heap() = 0; - - /** - * Reload parent capability and reinitialize environment resources - * - * This function is solely used for implementing fork semantics. - * After forking a process, the new child process is executed - * within a copy of the address space of the forking process. - * Thereby, the new process inherits the original 'env' object of - * the forking process, which is meaningless in the context of the - * new process. By calling this function, the new process is able - * to reinitialize its 'env' with meaningful capabilities obtained - * via its updated parent capability. - * - * \noapi - */ - virtual void reinit(Native_capability::Dst, long) = 0; - - /** - * Reinitialize main-thread object - * - * \param stack_area_rm new RM session of the stack area - * - * This function is solely used for implementing fork semantics - * as provided by the Noux environment. - * - * \noapi - */ - virtual void reinit_main_thread(Capability &stack_area_rm) = 0; + virtual Entrypoint &ep() = 0; + virtual Ram_session_capability ram_session_cap() = 0; + virtual Cpu_session_capability cpu_session_cap() = 0; }; #endif /* _INCLUDE__BASE__ENV_H_ */ diff --git a/repos/base/include/deprecated/env.h b/repos/base/include/deprecated/env.h new file mode 100644 index 000000000..cd042a13e --- /dev/null +++ b/repos/base/include/deprecated/env.h @@ -0,0 +1,125 @@ +/* + * \brief Environment of a component + * \author Norman Feske + * \date 2006-07-01 + * + * \deprecated This interface will be removed once all components are + * adjusted to the new API of base/component.h + */ + +/* + * Copyright (C) 2006-2013 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 _INCLUDE__DEPRECATED__ENV_H_ +#define _INCLUDE__DEPRECATED__ENV_H_ + +#include +#include +#include +#include /* deprecated, kept for API compatibility only */ +#include +#include +#include +#include +#include +#include +#include + +namespace Genode { + + struct Env_deprecated; + + /** + * Return the interface to the component's environment + */ + extern Env_deprecated *env(); +} + + +/** + * Component runtime environment + * + * The environment of a Genode component is defined by its parent. The 'Env' + * class allows the component to interact with its environment. It is + * initialized at the startup of the component. + */ +struct Genode::Env_deprecated +{ + /** + * Communication channel to our parent + */ + 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() = 0; + virtual Ram_session_capability ram_session_cap() = 0; + + /** + * CPU session of the component + * + * This session is used to create the threads of the component. + */ + virtual Cpu_session *cpu_session() = 0; + virtual Cpu_session_capability cpu_session_cap() = 0; + + /** + * Region-manager session of the component as created by the parent + * + * \deprecated This function exists for API compatibility only. + * The functionality of the former RM service is now + * provided by the 'Region_map' interface. + */ + virtual Region_map *rm_session() = 0; + + /** + * PD session of the component as created by the parent + */ + 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 + * + * This function is solely used for implementing fork semantics. + * After forking a process, the new child process is executed + * within a copy of the address space of the forking process. + * Thereby, the new process inherits the original 'env' object of + * the forking process, which is meaningless in the context of the + * new process. By calling this function, the new process is able + * to reinitialize its 'env' with meaningful capabilities obtained + * via its updated parent capability. + * + * \noapi + */ + virtual void reinit(Native_capability::Dst, long) = 0; + + /** + * Reinitialize main-thread object + * + * \param stack_area_rm new RM session of the stack area + * + * This function is solely used for implementing fork semantics + * as provided by the Noux environment. + * + * \noapi + */ + virtual void reinit_main_thread(Capability &stack_area_rm) = 0; + +}; + +#endif /* _INCLUDE__DEPRECATED__ENV_H_ */ diff --git a/repos/base/src/base/component/component.cc b/repos/base/src/base/component/component.cc index 4a224685f..9a10cb03e 100644 --- a/repos/base/src/base/component/component.cc +++ b/repos/base/src/base/component/component.cc @@ -19,11 +19,11 @@ namespace { - struct Environment : Genode::Environment + struct Env : Genode::Env { Genode::Entrypoint &_ep; - Environment(Genode::Entrypoint &ep) : _ep(ep) { } + Env(Genode::Entrypoint &ep) : _ep(ep) { } Genode::Parent &parent() override { return *Genode::env()->parent(); } Genode::Ram_session &ram() override { return *Genode::env()->ram_session(); } @@ -59,7 +59,7 @@ namespace Genode { */ struct Genode::Startup { - ::Environment env { ep }; + ::Env env { ep }; /* * The construction of the main entrypoint does never return. diff --git a/repos/base/src/base/entrypoint/entrypoint.cc b/repos/base/src/base/entrypoint/entrypoint.cc index 17ba28703..2edb36895 100644 --- a/repos/base/src/base/entrypoint/entrypoint.cc +++ b/repos/base/src/base/entrypoint/entrypoint.cc @@ -30,7 +30,7 @@ namespace Genode { void init_signal_thread(); void destroy_signal_thread(); - extern void (*call_component_construct)(Genode::Environment &); + extern void (*call_component_construct)(Genode::Env &); } @@ -133,8 +133,8 @@ namespace { struct Constructor_component : Rpc_object { - Environment &env; - Constructor_component(Environment &env) : env(env) { } + Env &env; + Constructor_component(Env &env) : env(env) { } void construct() { @@ -149,7 +149,7 @@ namespace { } -Entrypoint::Entrypoint(Environment &env) +Entrypoint::Entrypoint(Env &env) : _env(env), _rpc_ep(&env.pd(), Component::stack_size(), Component::name()) @@ -181,7 +181,7 @@ Entrypoint::Entrypoint(Environment &env) } -Entrypoint::Entrypoint(Environment &env, size_t stack_size, char const *name) +Entrypoint::Entrypoint(Env &env, size_t stack_size, char const *name) : _env(env), _rpc_ep(&env.pd(), stack_size, name) diff --git a/repos/base/src/base/env/env.cc b/repos/base/src/base/env/env.cc index a9b5d0da3..d4ff10c74 100644 --- a/repos/base/src/base/env/env.cc +++ b/repos/base/src/base/env/env.cc @@ -19,7 +19,7 @@ namespace Genode { /* * Request pointer to static environment of the Genode application */ - Env *env() + Env_deprecated *env() { /* * By placing the environment as static object here, we ensure that its diff --git a/repos/base/src/core/include/core_env.h b/repos/base/src/core/include/core_env.h index 9736b45de..62ae304c7 100644 --- a/repos/base/src/core/include/core_env.h +++ b/repos/base/src/core/include/core_env.h @@ -110,7 +110,7 @@ namespace Genode { }; - class Core_env : public Env + class Core_env : public Env_deprecated { private: diff --git a/repos/base/src/core/main.cc b/repos/base/src/core/main.cc index 83c1bc222..5eb01c268 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 * Genode::env() { +Env_deprecated * Genode::env() { return core_env(); } diff --git a/repos/base/src/include/base/internal/platform_env.h b/repos/base/src/include/base/internal/platform_env.h index 944b107c2..9e9814966 100644 --- a/repos/base/src/include/base/internal/platform_env.h +++ b/repos/base/src/include/base/internal/platform_env.h @@ -60,7 +60,8 @@ struct Genode::Expanding_cpu_session_client : Upgradeable_client(_file->entry); entry(env); @@ -543,7 +543,7 @@ char const * Component::name() { return "ep"; } struct Failed_to_load_program { }; -void Component::construct(Genode::Environment &env) +void Component::construct(Genode::Env &env) { /* load program headers of linker now */ if (!Ld::linker()->file()) diff --git a/repos/base/src/lib/startup/component_construct.cc b/repos/base/src/lib/startup/component_construct.cc index 067400947..f57cee89c 100644 --- a/repos/base/src/lib/startup/component_construct.cc +++ b/repos/base/src/lib/startup/component_construct.cc @@ -34,15 +34,15 @@ namespace Genode { * component's entrypoint is activated. */ - extern void (*call_component_construct)(Genode::Environment &) __attribute__((weak)); + extern void (*call_component_construct)(Genode::Env &) __attribute__((weak)); } -static void default_component_construct(Genode::Environment &env) +static void default_component_construct(Genode::Env &env) { Component::construct(env); } -void (*Genode::call_component_construct)(Genode::Environment &) = &default_component_construct; +void (*Genode::call_component_construct)(Genode::Env &) = &default_component_construct; /**************************************************** @@ -71,8 +71,8 @@ extern char **genode_envp; extern int main(int argc, char **argv, char **envp); -void Component::construct(Genode::Environment &env) __attribute__((weak)); -void Component::construct(Genode::Environment &env) +void Component::construct(Genode::Env &env) __attribute__((weak)); +void Component::construct(Genode::Env &env) { /* call real main function */ exit_status = main(genode_argc, genode_argv, genode_envp); diff --git a/repos/base/src/lib/startup/component_entry_point.cc b/repos/base/src/lib/startup/component_entry_point.cc index 16d3255e8..2afd66751 100644 --- a/repos/base/src/lib/startup/component_entry_point.cc +++ b/repos/base/src/lib/startup/component_entry_point.cc @@ -20,12 +20,12 @@ /* FIXME move to base-internal header */ namespace Genode { - extern void (*call_component_construct)(Environment &); + extern void (*call_component_construct)(Env &); } namespace Genode { - void component_entry_point(Genode::Environment &env) + void component_entry_point(Genode::Env &env) { call_component_construct(env); } diff --git a/repos/libports/src/lib/libc/task.cc b/repos/libports/src/lib/libc/task.cc index 4a3da51e4..01a75fb44 100644 --- a/repos/libports/src/lib/libc/task.cc +++ b/repos/libports/src/lib/libc/task.cc @@ -35,8 +35,8 @@ namespace Libc { class Task; - void (*original_call_component_construct)(Genode::Environment &); - void call_component_construct(Genode::Environment &env); + void (*original_call_component_construct)(Genode::Env &); + void call_component_construct(Genode::Env &env); } @@ -64,7 +64,7 @@ class Libc::Task : public Genode::Rpc_object { private: - Genode::Environment &_env; + Genode::Env &_env; /** * Application context and execution state @@ -91,7 +91,7 @@ class Libc::Task : public Genode::Rpc_object public: - Task(Genode::Environment &env) : _env(env) { } + Task(Genode::Env &env) : _env(env) { } ~Task() { PERR("%s should not be executed!", __PRETTY_FUNCTION__); } @@ -184,9 +184,9 @@ namespace Libc { ****************************/ /* XXX needs base-internal header? */ -namespace Genode { extern void (*call_component_construct)(Genode::Environment &); } +namespace Genode { extern void (*call_component_construct)(Genode::Env &); } -void Libc::call_component_construct(Genode::Environment &env) +void Libc::call_component_construct(Genode::Env &env) { task = unmanaged_singleton(env); task->run(); diff --git a/repos/os/src/drivers/framebuffer/spec/sdl/fb_sdl.cc b/repos/os/src/drivers/framebuffer/spec/sdl/fb_sdl.cc index b50aeb692..5c34f89d2 100644 --- a/repos/os/src/drivers/framebuffer/spec/sdl/fb_sdl.cc +++ b/repos/os/src/drivers/framebuffer/spec/sdl/fb_sdl.cc @@ -152,7 +152,7 @@ struct Main struct Sdl_videodriver_not_supported { }; struct Sdl_setvideomode_failed { }; - Genode::Environment &env; + Genode::Env &env; int fb_width { config_arg("width", 1024) }; int fb_height { config_arg("height", 768) }; @@ -172,7 +172,7 @@ struct Main Input::Handler_component input_handler_component { input_session }; Input::Handler_client input_handler_client { env.ep().manage(input_handler_component) }; - Main(Genode::Environment &env) : env(env) + Main(Genode::Env &env) : env(env) { /* * Initialize libSDL window @@ -214,6 +214,6 @@ struct Main }; -Genode::size_t Component::stack_size() { return 4*1024*sizeof(long); } -char const * Component::name() { return "fb_sdl"; } -void Component::construct(Genode::Environment &env) { static Main inst(env); } +Genode::size_t Component::stack_size() { return 4*1024*sizeof(long); } +char const * Component::name() { return "fb_sdl"; } +void Component::construct(Genode::Env &env) { static Main inst(env); } diff --git a/repos/os/src/lib/server/server.cc b/repos/os/src/lib/server/server.cc index deb7a71be..0b13f8507 100644 --- a/repos/os/src/lib/server/server.cc +++ b/repos/os/src/lib/server/server.cc @@ -27,10 +27,10 @@ char const *Component::name() } -static Genode::Environment *_env; +static Genode::Env *_env; -void Component::construct(Genode::Environment &env) +void Component::construct(Genode::Env &env) { _env = &env; Server::construct(env.ep());