mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 00:24:51 +00:00
parent
5e940da040
commit
abd55fda9a
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user