libc_noux: remove dependency on 'platform_env.h'

Currently, libc_noux includes the 'base/src/base/env/platform_env.h' file
to be able to reinitialize the environment using the 'Platform_env'
interface. For base-linux, a special version of this file exists and the
inclusion of the generic version in libc_noux causes GCC 4.9 to make wrong
assumptions about the memory layout of the 'Env' object returned by
'Genode::env()'.

This commit moves the reinitialization functions to the 'Env' interface to
avoid the need to include the 'platform_env.h' file in libc_noux.

Fixes #1510
This commit is contained in:
Christian Prochaska
2015-05-11 16:12:21 +02:00
committed by Christian Helmuth
parent 1207a4cecd
commit 3a378bb970
6 changed files with 42 additions and 40 deletions

View File

@ -154,10 +154,6 @@ Platform_env::Local_parent &Platform_env::_parent()
}
void Platform_env::reinit(Native_capability::Dst, long) { }
void Platform_env::reinit_main_thread(Rm_session_capability &) { }
Platform_env::Platform_env()
:
Platform_env_base(static_cap_cast<Ram_session>(_parent().session("Env::ram_session", "")),

View File

@ -353,6 +353,14 @@ namespace Genode {
Linux_cpu_session *cpu_session() { return &_cpu_session_client; }
Cpu_session_capability cpu_session_cap() { return _cpu_session_cap; }
Pd_session *pd_session() { return &_pd_session_client; }
/*
* Support functions for implementing fork on Noux.
*
* Not supported on Linux.
*/
void reinit(Native_capability::Dst, long) { };
void reinit_main_thread(Rm_session_capability &) { };
};
@ -431,16 +439,6 @@ namespace Genode {
*/
~Platform_env() { _parent().exit(0); }
/*
* Support functions for implementing fork on Noux.
*
* Not supported on Linux.
*
* See the documentation in 'base/src/base/env/platform_env.h'
*/
void reinit(Native_capability::Dst, long);
void reinit_main_thread(Rm_session_capability &);
/*************************************
** Emergency_ram_reserve interface **