diff --git a/base-hw/include/kernel/interface.h b/base-hw/include/kernel/interface.h index 0801495fa..fa5593e34 100644 --- a/base-hw/include/kernel/interface.h +++ b/base-hw/include/kernel/interface.h @@ -250,24 +250,24 @@ namespace Kernel /** * Prevent thread from participating in CPU scheduling * - * \param id ID of the targeted thread. If not set - * this will target the current thread. + * \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 the caller doesn't target itself, this is restricted to core threads. + * 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 id = 0) + inline int pause_thread(unsigned const thread_id) { - return call(Call_id::PAUSE_THREAD, id); + return call(Call_id::PAUSE_THREAD, thread_id); } /** * Let an already started thread participate in CPU scheduling * - * \param id ID of the targeted thread + * \param thread_id kernel name of the targeted thread * * \retval 0 succeeded and thread was paused beforehand * \retval 1 succeeded and thread was active beforehand @@ -276,21 +276,23 @@ namespace Kernel * If the targeted thread blocks for any event except a 'start_thread' * call this call cancels the blocking. */ - inline int resume_thread(unsigned const id = 0) + inline int resume_thread(unsigned const thread_id) { - return call(Call_id::RESUME_THREAD, id); + return call(Call_id::RESUME_THREAD, thread_id); } /** * Let the current thread give up its remaining timeslice * - * \param id if this thread ID is set and valid this will resume the - * targeted thread additionally + * \param thread_id kernel name of the benefited thread + * + * If thread_id is valid the call will resume the targeted thread + * additionally. */ - inline void yield_thread(unsigned const id = 0) + inline void yield_thread(unsigned const thread_id) { - call(Call_id::YIELD_THREAD, id); + call(Call_id::YIELD_THREAD, thread_id); } diff --git a/base-hw/src/base/ipc.cc b/base-hw/src/base/ipc.cc index 7b7a8f680..ce2d209f5 100644 --- a/base-hw/src/base/ipc.cc +++ b/base-hw/src/base/ipc.cc @@ -95,7 +95,7 @@ Ipc_ostream::Ipc_ostream(Native_capability dst, Msgbuf_base *snd_msg) void Ipc_istream::_wait() { /* FIXME: this shall be not supported */ - Kernel::pause_thread(); + Kernel::pause_thread(0); } diff --git a/base-hw/src/base/lock/lock_helper.h b/base-hw/src/base/lock/lock_helper.h index e10f36664..4798a183c 100644 --- a/base-hw/src/base/lock/lock_helper.h +++ b/base-hw/src/base/lock/lock_helper.h @@ -24,7 +24,7 @@ extern Genode::Native_thread_id _main_thread_id; /** * Yield execution time-slice of current thread */ -static inline void thread_yield() { Kernel::yield_thread(); } +static inline void thread_yield() { Kernel::yield_thread(0); } /** @@ -59,7 +59,7 @@ thread_check_stopped_and_restart(Genode::Thread_base * const t) /** * Pause execution of current thread */ -static inline void thread_stop_myself() { Kernel::pause_thread(); } +static inline void thread_stop_myself() { Kernel::pause_thread(0); } #endif /* _LOCK_HELPER_H_ */ diff --git a/base-hw/src/core/include/platform.h b/base-hw/src/core/include/platform.h index 9dbc63853..f82f46c14 100644 --- a/base-hw/src/core/include/platform.h +++ b/base-hw/src/core/include/platform.h @@ -107,7 +107,10 @@ namespace Genode { inline Rom_fs *rom_fs() { return &_rom_fs; } - inline void wait_for_exit() { while (1) Kernel::pause_thread(); }; + inline void wait_for_exit() + { + while (1) { Kernel::pause_thread(0); } + }; bool supports_direct_unmap() const { return 1; }