thread: rearrange thread context management

Use a bit allocator for the allocation management of thread contexts,
instead of holding allocation information within the Thread_base objects,
which lead to race conditions in the past.

Moreover, extend the Thread_base class interface with the ability to
to add additional stacks to a thread, and associate the context they're
located in with the corresponding Thread_base object. Additional stacks
can be used to do user-level scheduling with stack switching, without breaking
Genode's API.

Fixes #1024
Fixes #1036
This commit is contained in:
Stefan Kalkowski
2014-01-24 12:06:21 +01:00
committed by Christian Helmuth
parent 66c5887bd3
commit 5447c406e5
25 changed files with 259 additions and 179 deletions

View File

@ -402,8 +402,6 @@ void Thread_base::join()
Thread_base::Thread_base(const char *name, size_t stack_size)
:
_list_element(this)
{
_tid.meta_data = new (env()->heap()) Thread_meta_data_created(this);