libc_noux: remove use of private Native_config API
This commit is contained in:
parent
30e129a91b
commit
e74b53d5dd
|
@ -167,7 +167,7 @@ append config {
|
||||||
<dir name="ram"> <fs label="root" /> </dir>
|
<dir name="ram"> <fs label="root" /> </dir>
|
||||||
<dir name="tmp"> <fs label="tmp" /> </dir>
|
<dir name="tmp"> <fs label="tmp" /> </dir>
|
||||||
|
|
||||||
<dir name="dev"> <rtc/> <zero/> </dir>
|
<dir name="dev"> <rtc/> <zero/> <null/> </dir>
|
||||||
|
|
||||||
</fstab>
|
</fstab>
|
||||||
<start name="/bin/bash">
|
<start name="/bin/bash">
|
||||||
|
|
|
@ -98,9 +98,8 @@ class Noux_connection
|
||||||
*/
|
*/
|
||||||
Genode::Rm_session_capability context_area_rm_session()
|
Genode::Rm_session_capability context_area_rm_session()
|
||||||
{
|
{
|
||||||
using namespace Genode;
|
int on_stack;
|
||||||
addr_t const addr = Native_config::context_area_virtual_base();
|
return _connection.lookup_rm_session((Genode::addr_t)&on_stack);
|
||||||
return _connection.lookup_rm_session(addr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Noux::Session *session() { return &_connection; }
|
Noux::Session *session() { return &_connection; }
|
||||||
|
@ -518,10 +517,6 @@ extern "C" void fork_trampoline()
|
||||||
/* reinitialize noux connection */
|
/* reinitialize noux connection */
|
||||||
construct_at<Noux_connection>(noux_connection());
|
construct_at<Noux_connection>(noux_connection());
|
||||||
|
|
||||||
/* reinitialize main-thread object which implies reinit of context area */
|
|
||||||
auto context_area_rm = noux_connection()->context_area_rm_session();
|
|
||||||
env()->reinit_main_thread(context_area_rm);
|
|
||||||
|
|
||||||
/* apply processor state that the forker had when he did the fork */
|
/* apply processor state that the forker had when he did the fork */
|
||||||
longjmp(fork_jmp_buf, 1);
|
longjmp(fork_jmp_buf, 1);
|
||||||
}
|
}
|
||||||
|
@ -538,6 +533,11 @@ extern "C" pid_t fork(void)
|
||||||
/*
|
/*
|
||||||
* We got here via longjmp from 'fork_trampoline'.
|
* We got here via longjmp from 'fork_trampoline'.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* reinitialize main-thread object which implies reinit of context area */
|
||||||
|
auto context_area_rm = noux_connection()->context_area_rm_session();
|
||||||
|
Genode::env()->reinit_main_thread(context_area_rm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue