diff --git a/base-hw/src/base/thread/thread_bootstrap.cc b/base-hw/src/base/thread/thread_bootstrap.cc index 999cdb9375..7c3cc925de 100644 --- a/base-hw/src/base/thread/thread_bootstrap.cc +++ b/base-hw/src/base/thread/thread_bootstrap.cc @@ -74,7 +74,15 @@ void Thread_base::_thread_bootstrap() void Thread_base::_init_platform_thread(Type type) { /* nothing platform specific to do if this is not a special thread */ - if (type == NORMAL) { return; } + if (type == NORMAL) + { + /* create server object */ + char buf[48]; + name(buf, sizeof(buf)); + Cpu_session * cpu = env()->cpu_session(); + _thread_cap = cpu->create_thread(buf, (addr_t)&_context->utcb); + return; + } /* if we got reinitialized we have to get rid of the old UTCB */ size_t const utcb_size = sizeof(Native_utcb); diff --git a/base-hw/src/base/thread_support.cc b/base-hw/src/base/thread_support.cc index 2703183b6d..da20d98928 100644 --- a/base-hw/src/base/thread_support.cc +++ b/base-hw/src/base/thread_support.cc @@ -61,12 +61,6 @@ void Thread_base::_deinit_platform_thread() void Thread_base::start() { - /* create server object */ - char buf[48]; - name(buf, sizeof(buf)); - Cpu_session * cpu = env()->cpu_session(); - _thread_cap = cpu->create_thread(buf, (addr_t)&_context->utcb); - /* assign thread to protection domain */ env()->pd_session()->bind_thread(_thread_cap);