diff --git a/base-hw/include/kernel/interface.h b/base-hw/include/kernel/interface.h index 3001d99990..d5a7252a8e 100644 --- a/base-hw/include/kernel/interface.h +++ b/base-hw/include/kernel/interface.h @@ -90,15 +90,12 @@ namespace Kernel * * \param thread_id kernel name of the targeted thread or 0 * - * \retval 0 succeeded - * \retval -1 the targeted thread does not exist or is still active - * * If thread_id is set to 0 the caller targets itself. If the caller * doesn't target itself, the call is restricted to core threads. */ - inline int pause_thread(unsigned const thread_id) + inline void pause_thread(unsigned const thread_id) { - return call(call_id_pause_thread(), thread_id); + call(call_id_pause_thread(), thread_id); } diff --git a/base-hw/src/core/kernel/thread.cc b/base-hw/src/core/kernel/thread.cc index dae8a7ad70..8c57d1f898 100644 --- a/base-hw/src/core/kernel/thread.cc +++ b/base-hw/src/core/kernel/thread.cc @@ -386,7 +386,6 @@ void Thread::_call_pause_thread() unsigned const thread_id = user_arg_1(); if (!thread_id || thread_id == id()) { _pause(); - user_arg_0(0); return; } /* check permissions */ @@ -399,12 +398,11 @@ void Thread::_call_pause_thread() Thread * const thread = Thread::pool()->object(thread_id); if (!thread) { PWRN("failed to lookup thread"); - user_arg_0(-1); + _stop(); return; } /* pause thread */ thread->_pause(); - user_arg_0(0); }