parent
c76de84f0a
commit
096d72de90
|
@ -55,12 +55,18 @@ void Thread_base::start()
|
||||||
char buf[48];
|
char buf[48];
|
||||||
name(buf, sizeof(buf));
|
name(buf, sizeof(buf));
|
||||||
_thread_cap = _cpu_session->create_thread(0, buf, (addr_t)&_context->utcb);
|
_thread_cap = _cpu_session->create_thread(0, buf, (addr_t)&_context->utcb);
|
||||||
|
if (!_thread_cap.valid())
|
||||||
|
throw Cpu_session::Thread_creation_failed();
|
||||||
|
|
||||||
/* assign thread to protection domain */
|
/* assign thread to protection domain */
|
||||||
env()->pd_session()->bind_thread(_thread_cap);
|
if (env()->pd_session()->bind_thread(_thread_cap))
|
||||||
|
throw Cpu_session::Thread_creation_failed();
|
||||||
|
|
||||||
/* create new pager object and assign it to the new thread */
|
/* create new pager object and assign it to the new thread */
|
||||||
Pager_capability pager_cap = env()->rm_session()->add_client(_thread_cap);
|
Pager_capability pager_cap = env()->rm_session()->add_client(_thread_cap);
|
||||||
|
if (!pager_cap.valid())
|
||||||
|
throw Cpu_session::Thread_creation_failed();
|
||||||
|
|
||||||
_cpu_session->set_pager(_thread_cap, pager_cap);
|
_cpu_session->set_pager(_thread_cap, pager_cap);
|
||||||
|
|
||||||
/* register initial IP and SP at core */
|
/* register initial IP and SP at core */
|
||||||
|
|
Loading…
Reference in New Issue