base: hide internals of the Thread API

This patch moves details about the stack allocation and organization
the base-internal headers. Thereby, I replaced the notion of "thread
contexts" by "stacks" as this term is much more intuitive. The fact that
we place thread-specific information at the bottom of the stack is not
worth introducing new terminology.

Issue #1832
This commit is contained in:
Norman Feske
2016-01-23 14:42:55 +01:00
committed by Christian Helmuth
parent 3c686fc9c6
commit 7f73e5e879
115 changed files with 982 additions and 770 deletions

View File

@ -572,9 +572,9 @@ int main()
/* print loaded object information */
try {
if (Genode::config()->xml_node().attribute("ld_verbose").has_value("yes")) {
PINF(" %lx .. %lx: context area", Genode::Native_config::context_area_virtual_base(),
Genode::Native_config::context_area_virtual_base() +
Genode::Native_config::context_area_virtual_size() - 1);
PINF(" %lx .. %lx: stack area", Genode::Native_config::stack_area_virtual_base(),
Genode::Native_config::stack_area_virtual_base() +
Genode::Native_config::stack_area_virtual_size() - 1);
dump_loaded();
}
} catch (...) { }

View File

@ -25,7 +25,7 @@ addr_t init_main_thread_result;
extern void init_exception_handling();
namespace Genode { Rm_session * env_context_area_rm_session(); }
namespace Genode { Rm_session * env_stack_area_rm_session(); }
void prepare_init_main_thread();
@ -97,7 +97,7 @@ extern "C" void init_main_thread()
* We create the thread-context area as early as possible to prevent other
* mappings from occupying the predefined virtual-memory region.
*/
env_context_area_rm_session();
env_stack_area_rm_session();
/*
* Trigger first exception. This step has two purposes.
@ -112,7 +112,7 @@ extern "C" void init_main_thread()
* Genode's heap and, in some corner cases, consumes several KB of stack.
* This is usually not a problem when the first exception is triggered from
* the main thread but it becomes an issue when the first exception is
* thrown from the context of a thread with a specially tailored (and
* thrown from the stack of a thread with a specially tailored (and
* otherwise sufficient) stack size. By throwing an exception here, we
* mitigate this issue by eagerly performing those allocations.
*/