hw: don't return a result in Kernel::pause_thread

ref #1101
This commit is contained in:
Martin Stein 2014-03-16 15:39:58 +01:00 committed by Norman Feske
parent 5e940da040
commit abd55fda9a
2 changed files with 3 additions and 8 deletions

View File

@ -90,15 +90,12 @@ namespace Kernel
* *
* \param thread_id kernel name of the targeted thread or 0 * \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 * 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. * 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);
} }

View File

@ -386,7 +386,6 @@ void Thread::_call_pause_thread()
unsigned const thread_id = user_arg_1(); unsigned const thread_id = user_arg_1();
if (!thread_id || thread_id == id()) { if (!thread_id || thread_id == id()) {
_pause(); _pause();
user_arg_0(0);
return; return;
} }
/* check permissions */ /* check permissions */
@ -399,12 +398,11 @@ void Thread::_call_pause_thread()
Thread * const thread = Thread::pool()->object(thread_id); Thread * const thread = Thread::pool()->object(thread_id);
if (!thread) { if (!thread) {
PWRN("failed to lookup thread"); PWRN("failed to lookup thread");
user_arg_0(-1); _stop();
return; return;
} }
/* pause thread */ /* pause thread */
thread->_pause(); thread->_pause();
user_arg_0(0);
} }