thread: init thread cap for non-core main threads

ref #989
This commit is contained in:
Martin Stein 2014-02-21 17:57:59 +01:00 committed by Christian Helmuth
parent 379c6c1cd4
commit 99ec536c53
3 changed files with 6 additions and 1 deletions

View File

@ -91,4 +91,5 @@ void Thread_base::_init_platform_thread(Type type)
}
/* adjust initial object state in case of a main thread */
tid().thread_id = _main_thread_id;
_thread_cap = env()->parent()->main_thread_cap();
}

View File

@ -14,6 +14,7 @@
/* Genode includes */
#include <base/thread.h>
#include <base/env.h>
/* OKL4 includes */
namespace Okl4
@ -82,4 +83,5 @@ void Genode::Thread_base::_init_platform_thread(Type type)
{
if (type == NORMAL) { return; }
_tid.l4id.raw = main_thread_tid.raw;
_thread_cap = env()->parent()->main_thread_cap();
}

View File

@ -13,6 +13,7 @@
/* Genode includes */
#include <base/thread.h>
#include <base/env.h>
/* Pistachio includes */
namespace Pistachio
@ -48,5 +49,6 @@ void Genode::Thread_base::_thread_bootstrap()
void Genode::Thread_base::_init_platform_thread(Type type)
{
if (type == NORMAL) { return; }
_tid.l4id = main_thread_tid;
_tid.l4id = main_thread_tid;
_thread_cap = env()->parent()->main_thread_cap();
}