mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 07:08:18 +00:00
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
This commit is contained in:
committed by
Christian Helmuth
parent
7274ca997d
commit
4f69772ecc
@ -357,7 +357,7 @@ struct Linker::Binary : Root_object, Elf_object
|
||||
return 0;
|
||||
}
|
||||
|
||||
void call_entry_point(Genode::Environment &env)
|
||||
void call_entry_point(Genode::Env &env)
|
||||
{
|
||||
/* call static construtors and register destructors */
|
||||
Func * const ctors_start = (Func *)lookup_symbol("_ctors_start");
|
||||
@ -371,7 +371,7 @@ struct Linker::Binary : Root_object, Elf_object
|
||||
/* call component entry point */
|
||||
/* XXX the function type for call_component_construct() is a candidate
|
||||
* for a base-internal header */
|
||||
typedef void (*Entry)(Genode::Environment &);
|
||||
typedef void (*Entry)(Genode::Env &);
|
||||
Entry const entry = reinterpret_cast<Entry>(_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())
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user