foc: Create thread at core at construction time

Originally, a thread was created at core not before calling the 'start'
function. In order to configure the thread affinity before starting the
thread, we have to make the thread known at core right at construction
time. This patch moves the needed thread-creation sequence from the
'start' function to the '_init_platform_thread' function.
This commit is contained in:
Norman Feske 2013-03-21 12:47:42 +01:00
parent d7f85ef81f
commit 297538678e
3 changed files with 10 additions and 6 deletions

View File

@ -27,6 +27,3 @@ void Genode::Thread_base::_thread_start()
Lock sleep_forever_lock(Lock::LOCKED);
sleep_forever_lock.lock();
}
void Genode::Thread_base::_init_platform_thread() { }

View File

@ -38,10 +38,8 @@ void Thread_base::_deinit_platform_thread()
}
void Thread_base::start()
void Genode::Thread_base::_init_platform_thread()
{
using namespace Fiasco;
/* create thread at core */
char buf[48];
name(buf, sizeof(buf));
@ -49,6 +47,12 @@ void Thread_base::start()
/* assign thread to protection domain */
env()->pd_session()->bind_thread(_thread_cap);
}
void Thread_base::start()
{
using namespace Fiasco;
/* create new pager object and assign it to the new thread */
_pager_cap = env()->rm_session()->add_client(_thread_cap);

View File

@ -35,6 +35,9 @@ void Thread_base::_deinit_platform_thread()
}
void Genode::Thread_base::_init_platform_thread() { }
void Thread_base::start()
{
using namespace Fiasco;