mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-12 05:41:36 +00:00
parent
c76de84f0a
commit
096d72de90
@ -55,12 +55,18 @@ void Thread_base::start()
|
||||
char buf[48];
|
||||
name(buf, sizeof(buf));
|
||||
_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 */
|
||||
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 */
|
||||
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);
|
||||
|
||||
/* register initial IP and SP at core */
|
||||
|
Loading…
x
Reference in New Issue
Block a user