diff --git a/repos/base-hw/include/base/native_types.h b/repos/base-hw/include/base/native_types.h index f271b55f52..4c1a2eb94d 100644 --- a/repos/base-hw/include/base/native_types.h +++ b/repos/base-hw/include/base/native_types.h @@ -27,7 +27,6 @@ namespace Genode { class Platform_thread; - class Tlb; typedef unsigned Native_thread_id; diff --git a/repos/base-hw/include/kernel/interface.h b/repos/base-hw/include/kernel/interface.h index 660f15d499..be951cbcc7 100644 --- a/repos/base-hw/include/kernel/interface.h +++ b/repos/base-hw/include/kernel/interface.h @@ -21,12 +21,10 @@ namespace Genode { class Native_utcb; class Platform_pd; - class Tlb; } namespace Kernel { - typedef Genode::Tlb Tlb; typedef Genode::addr_t addr_t; typedef Genode::size_t size_t; typedef Genode::Platform_pd Platform_pd; diff --git a/repos/base-hw/src/core/include/kernel/core_interface.h b/repos/base-hw/src/core/include/kernel/core_interface.h index 31f3377ed0..49260cec13 100644 --- a/repos/base-hw/src/core/include/kernel/core_interface.h +++ b/repos/base-hw/src/core/include/kernel/core_interface.h @@ -141,12 +141,15 @@ namespace Kernel * \param cpu_id kernel name of the targeted CPU * \param pd_id kernel name of the targeted domain * \param utcb core local pointer to userland thread-context + * + * \retval 0 suceeded + * \retval !=0 failed */ - inline Tlb * start_thread(unsigned const thread_id, unsigned const cpu_id, - unsigned const pd_id, Native_utcb * const utcb) + inline int start_thread(unsigned const thread_id, unsigned const cpu_id, + unsigned const pd_id, Native_utcb * const utcb) { - return (Tlb *)call(call_id_start_thread(), thread_id, cpu_id, pd_id, - (Call_arg)utcb); + return call(call_id_start_thread(), thread_id, cpu_id, pd_id, + (Call_arg)utcb); } diff --git a/repos/base-hw/src/core/kernel/thread.cc b/repos/base-hw/src/core/kernel/thread.cc index 3a38e339ef..6b7600078b 100644 --- a/repos/base-hw/src/core/kernel/thread.cc +++ b/repos/base-hw/src/core/kernel/thread.cc @@ -295,26 +295,26 @@ void Thread::_call_start_thread() Thread * const thread = Thread::pool()->object(user_arg_1()); if (!thread) { PWRN("failed to lookup thread"); - user_arg_0(0); + user_arg_0(-1); return; } /* lookup CPU */ Cpu * const cpu = cpu_pool()->cpu(user_arg_2()); if (!cpu) { PWRN("failed to lookup CPU"); - user_arg_0(0); + user_arg_0(-2); return; } /* lookup domain */ Pd * const pd = Pd::pool()->object(user_arg_3()); if (!pd) { PWRN("failed to lookup domain"); - user_arg_0(0); + user_arg_0(-3); return; } /* start thread */ thread->init(cpu, pd, (Native_utcb *)user_arg_4(), 1); - user_arg_0((Call_ret)thread->_pd->translation_table()); + user_arg_0(0); } diff --git a/repos/base-hw/src/core/platform_thread.cc b/repos/base-hw/src/core/platform_thread.cc index b6511c2079..2686b722ed 100644 --- a/repos/base-hw/src/core/platform_thread.cc +++ b/repos/base-hw/src/core/platform_thread.cc @@ -206,7 +206,7 @@ int Platform_thread::start(void * const ip, void * const sp) unsigned const cpu = _location.valid() ? _location.xpos() : Cpu::primary_id(); _utcb_core_addr->start_info()->init(_id, _utcb); - if (!Kernel::start_thread(_id, cpu, _pd->id(), _utcb_core_addr)) { + if (Kernel::start_thread(_id, cpu, _pd->id(), _utcb_core_addr)) { PERR("failed to start thread"); return -1; }