lx_kit: Let 'construct_env' return Lx_kit::Env

This commit is contained in:
Sebastian Sumpf 2017-02-07 10:37:56 +01:00 committed by Norman Feske
parent 643a09b518
commit 93d8b4487f
3 changed files with 5 additions and 3 deletions

View File

@ -110,7 +110,6 @@ static inline size_t min(size_t a, size_t b) {
#define max(x, y) ({ \
typeof(x) _max1 = (x); \
typeof(y) _max2 = (y); \
(void) (&_max1 == &_max2); \
_max1 > _max2 ? _max1 : _max2; })
#define min_t(type, x, y) ({ \

View File

@ -24,7 +24,7 @@ namespace Lx_kit {
Env &env();
void construct_env(Genode::Env &env);
Env &construct_env(Genode::Env &env);
}
class Lx_kit::Env
@ -42,6 +42,8 @@ class Lx_kit::Env
Genode::Env &env() { return _env; }
Genode::Heap &heap() { return _heap; }
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_ */

View File

@ -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);
return *_env;
}