mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 15:43:56 +00:00
lx_kit: Let 'construct_env' return Lx_kit::Env
This commit is contained in:
committed by
Norman Feske
parent
643a09b518
commit
93d8b4487f
@ -110,7 +110,6 @@ static inline size_t min(size_t a, size_t b) {
|
|||||||
#define max(x, y) ({ \
|
#define max(x, y) ({ \
|
||||||
typeof(x) _max1 = (x); \
|
typeof(x) _max1 = (x); \
|
||||||
typeof(y) _max2 = (y); \
|
typeof(y) _max2 = (y); \
|
||||||
(void) (&_max1 == &_max2); \
|
|
||||||
_max1 > _max2 ? _max1 : _max2; })
|
_max1 > _max2 ? _max1 : _max2; })
|
||||||
|
|
||||||
#define min_t(type, x, y) ({ \
|
#define min_t(type, x, y) ({ \
|
||||||
|
@ -24,7 +24,7 @@ namespace Lx_kit {
|
|||||||
|
|
||||||
Env &env();
|
Env &env();
|
||||||
|
|
||||||
void construct_env(Genode::Env &env);
|
Env &construct_env(Genode::Env &env);
|
||||||
}
|
}
|
||||||
|
|
||||||
class Lx_kit::Env
|
class Lx_kit::Env
|
||||||
@ -42,6 +42,8 @@ class Lx_kit::Env
|
|||||||
Genode::Env &env() { return _env; }
|
Genode::Env &env() { return _env; }
|
||||||
Genode::Heap &heap() { return _heap; }
|
Genode::Heap &heap() { return _heap; }
|
||||||
Genode::Attached_rom_dataspace &config_rom() { return _config; }
|
Genode::Attached_rom_dataspace &config_rom() { return _config; }
|
||||||
|
Genode::Ram_session &ram() { return _env.ram(); }
|
||||||
|
Genode::Region_map &rm() { return _env.rm(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _LX_KIT__ENV_H_ */
|
#endif /* _LX_KIT__ENV_H_ */
|
||||||
|
@ -25,7 +25,8 @@ Lx_kit::Env &Lx_kit::env()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Lx_kit::construct_env(Genode::Env &env)
|
Lx_kit::Env &Lx_kit::construct_env(Genode::Env &env)
|
||||||
{
|
{
|
||||||
_env.construct(env);
|
_env.construct(env);
|
||||||
|
return *_env;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user