mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
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="tmp"> <fs label="tmp" /> </dir>
|
||||
|
||||
<dir name="dev"> <rtc/> <zero/> </dir>
|
||||
<dir name="dev"> <rtc/> <zero/> <null/> </dir>
|
||||
|
||||
</fstab>
|
||||
<start name="/bin/bash">
|
||||
|
@ -98,9 +98,8 @@ class Noux_connection
|
||||
*/
|
||||
Genode::Rm_session_capability context_area_rm_session()
|
||||
{
|
||||
using namespace Genode;
|
||||
addr_t const addr = Native_config::context_area_virtual_base();
|
||||
return _connection.lookup_rm_session(addr);
|
||||
int on_stack;
|
||||
return _connection.lookup_rm_session((Genode::addr_t)&on_stack);
|
||||
}
|
||||
|
||||
Noux::Session *session() { return &_connection; }
|
||||
@ -518,10 +517,6 @@ extern "C" void fork_trampoline()
|
||||
/* reinitialize 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 */
|
||||
longjmp(fork_jmp_buf, 1);
|
||||
}
|
||||
@ -538,6 +533,11 @@ extern "C" pid_t fork(void)
|
||||
/*
|
||||
* 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;
|
||||
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user