From abd55fda9abd8136a26dde66727bcd4456fe6017 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Sun, 16 Mar 2014 15:39:58 +0100 Subject: [PATCH] hw: don't return a result in Kernel::pause_thread ref #1101 --- base-hw/include/kernel/interface.h | 7 ++----- base-hw/src/core/kernel/thread.cc | 4 +--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/base-hw/include/kernel/interface.h b/base-hw/include/kernel/interface.h index 3001d9999..d5a7252a8 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 dae8a7ad7..8c57d1f89 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); }