mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 07:38:28 +00:00
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:
committed by
Christian Helmuth
parent
3c686fc9c6
commit
7f73e5e879
@ -20,9 +20,9 @@
|
||||
extern "C" int raw_write_str(const char *str);
|
||||
|
||||
/**
|
||||
* Define context area
|
||||
* Define stack area
|
||||
*/
|
||||
Genode::addr_t _context_area_start;
|
||||
Genode::addr_t _stack_area_start;
|
||||
|
||||
|
||||
enum { verbose_atexit = false };
|
||||
@ -137,7 +137,7 @@ namespace Genode {
|
||||
struct Thread_meta_data
|
||||
{
|
||||
/**
|
||||
* Filled out by 'thread_start' function in the context of the new
|
||||
* Filled out by 'thread_start' function in the stack of the new
|
||||
* thread
|
||||
*/
|
||||
Thread_base * const thread_base;
|
||||
@ -419,7 +419,7 @@ Thread_base::Thread_base(size_t weight, const char *name, size_t stack_size,
|
||||
PERR("pthread_create failed (returned %d, errno=%d)",
|
||||
ret, errno);
|
||||
destroy(env()->heap(), _tid.meta_data);
|
||||
throw Context_alloc_failed();
|
||||
throw Out_of_stack_space();
|
||||
}
|
||||
|
||||
_tid.meta_data->wait_for_construction();
|
||||
|
Reference in New Issue
Block a user