mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 18:56:29 +00:00
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:
parent
d7f85ef81f
commit
297538678e
@ -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() { }
|
||||
|
@ -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);
|
||||
|
@ -35,6 +35,9 @@ void Thread_base::_deinit_platform_thread()
|
||||
}
|
||||
|
||||
|
||||
void Genode::Thread_base::_init_platform_thread() { }
|
||||
|
||||
|
||||
void Thread_base::start()
|
||||
{
|
||||
using namespace Fiasco;
|
||||
|
Loading…
Reference in New Issue
Block a user