hw: rename kill_* functions in bin_*

In the future bin_* means the direct destruction of a kernel object
without any blocking. kill_* in contrast is used for bringing a
kernel object such as signal contexts synchronized into a sleeping
state from where they can be destructed without the risk of getting
broken refs in userland.

ref #989
This commit is contained in:
Martin Stein 2013-12-05 16:12:48 +01:00 committed by Norman Feske
parent 750f5313f7
commit 3bdf70f771
6 changed files with 28 additions and 28 deletions

View File

@ -39,7 +39,7 @@ namespace Kernel
{
enum {
NEW_THREAD = 0,
KILL_THREAD = 1,
BIN_THREAD = 1,
START_THREAD = 2,
PAUSE_THREAD = 3,
RESUME_THREAD = 4,
@ -49,14 +49,14 @@ namespace Kernel
UPDATE_PD = 8,
UPDATE_REGION = 9,
NEW_PD = 10,
KILL_PD = 11,
BIN_PD = 11,
SEND_REQUEST_MSG = 12,
SEND_REPLY_MSG = 13,
AWAIT_REQUEST_MSG = 14,
NEW_SIGNAL_RECEIVER = 15,
NEW_SIGNAL_CONTEXT = 16,
KILL_SIGNAL_CONTEXT = 17,
KILL_SIGNAL_RECEIVER = 18,
BIN_SIGNAL_CONTEXT = 17,
BIN_SIGNAL_RECEIVER = 18,
SUBMIT_SIGNAL = 19,
AWAIT_SIGNAL = 20,
SIGNAL_PENDING = 21,
@ -151,9 +151,9 @@ namespace Kernel
* \retval 0 succeeded
* \retval -1 failed
*/
inline int kill_pd(unsigned const pd_id)
inline int bin_pd(unsigned const pd_id)
{
return call(Call_id::KILL_PD, pd_id);
return call(Call_id::BIN_PD, pd_id);
}
@ -223,9 +223,9 @@ namespace Kernel
*
* Restricted to core threads.
*/
inline void kill_thread(unsigned const thread_id)
inline void bin_thread(unsigned const thread_id)
{
call(Call_id::KILL_THREAD, thread_id);
call(Call_id::BIN_THREAD, thread_id);
}
@ -532,9 +532,9 @@ namespace Kernel
*
* Restricted to core threads.
*/
inline int kill_signal_context(unsigned const context)
inline int bin_signal_context(unsigned const context)
{
return call(Call_id::KILL_SIGNAL_CONTEXT, context);
return call(Call_id::BIN_SIGNAL_CONTEXT, context);
}
@ -548,9 +548,9 @@ namespace Kernel
*
* Restricted to core threads.
*/
inline int kill_signal_receiver(unsigned const receiver)
inline int bin_signal_receiver(unsigned const receiver)
{
return call(Call_id::KILL_SIGNAL_RECEIVER, receiver);
return call(Call_id::BIN_SIGNAL_RECEIVER, receiver);
}

View File

@ -293,7 +293,7 @@ void Thread::_call_new_pd()
}
void Thread::_call_kill_pd()
void Thread::_call_bin_pd()
{
/* check permissions */
if (!_core()) {
@ -337,7 +337,7 @@ void Thread::_call_new_thread()
}
void Thread::_call_kill_thread()
void Thread::_call_bin_thread()
{
/* check permissions */
assert(_core());
@ -815,7 +815,7 @@ void Thread::_call_ack_signal()
}
void Thread::_call_kill_signal_context()
void Thread::_call_bin_signal_context()
{
/* check permissions */
if (!_core()) {
@ -841,7 +841,7 @@ void Thread::_call_kill_signal_context()
}
void Thread::_call_kill_signal_receiver()
void Thread::_call_bin_signal_receiver()
{
/* check permissions */
if (!_core()) {
@ -944,7 +944,7 @@ void Thread::_call()
{
switch (user_arg_0()) {
case Call_id::NEW_THREAD: _call_new_thread(); return;
case Call_id::KILL_THREAD: _call_kill_thread(); return;
case Call_id::BIN_THREAD: _call_bin_thread(); return;
case Call_id::START_THREAD: _call_start_thread(); return;
case Call_id::PAUSE_THREAD: _call_pause_thread(); return;
case Call_id::RESUME_THREAD: _call_resume_thread(); return;
@ -958,8 +958,8 @@ void Thread::_call()
case Call_id::PRINT_CHAR: _call_print_char(); return;
case Call_id::NEW_SIGNAL_RECEIVER: _call_new_signal_receiver(); return;
case Call_id::NEW_SIGNAL_CONTEXT: _call_new_signal_context(); return;
case Call_id::KILL_SIGNAL_CONTEXT: _call_kill_signal_context(); return;
case Call_id::KILL_SIGNAL_RECEIVER: _call_kill_signal_receiver(); return;
case Call_id::BIN_SIGNAL_CONTEXT: _call_bin_signal_context(); return;
case Call_id::BIN_SIGNAL_RECEIVER: _call_bin_signal_receiver(); return;
case Call_id::AWAIT_SIGNAL: _call_await_signal(); return;
case Call_id::SUBMIT_SIGNAL: _call_submit_signal(); return;
case Call_id::SIGNAL_PENDING: _call_signal_pending(); return;
@ -967,7 +967,7 @@ void Thread::_call()
case Call_id::NEW_VM: _call_new_vm(); return;
case Call_id::RUN_VM: _call_run_vm(); return;
case Call_id::PAUSE_VM: _call_pause_vm(); return;
case Call_id::KILL_PD: _call_kill_pd(); return;
case Call_id::BIN_PD: _call_bin_pd(); return;
case Call_id::ACCESS_THREAD_REGS: _call_access_thread_regs(); return;
case Call_id::ROUTE_THREAD_EVENT: _call_route_thread_event(); return;
default:

View File

@ -203,9 +203,9 @@ class Kernel::Thread
****************************************************************/
void _call_new_pd();
void _call_kill_pd();
void _call_bin_pd();
void _call_new_thread();
void _call_kill_thread();
void _call_bin_thread();
void _call_start_thread();
void _call_pause_thread();
void _call_resume_thread();
@ -222,8 +222,8 @@ class Kernel::Thread
void _call_signal_pending();
void _call_submit_signal();
void _call_ack_signal();
void _call_kill_signal_context();
void _call_kill_signal_receiver();
void _call_bin_signal_context();
void _call_bin_signal_receiver();
void _call_new_vm();
void _call_run_vm();
void _call_pause_vm();

View File

@ -20,7 +20,7 @@ Platform_pd::~Platform_pd()
{
_tlb->remove_region(platform()->vm_start(), platform()->vm_size());
regain_ram_from_tlb(_tlb);
if (Kernel::kill_pd(_id)) {
if (Kernel::bin_pd(_id)) {
PERR("failed to destruct protection domain at kernel");
}
}

View File

@ -71,7 +71,7 @@ Platform_thread::~Platform_thread()
rm->remove_client(cap);
}
/* destroy object at the kernel */
Kernel::kill_thread(_id);
Kernel::bin_thread(_id);
}

View File

@ -137,7 +137,7 @@ void Signal_session_component::free_context(Signal_context_capability cap)
void Signal_session_component::_destruct_context(Context * const c)
{
/* release kernel resources */
if (Kernel::kill_signal_context(c->id()))
if (Kernel::bin_signal_context(c->id()))
{
/* clean-up */
c->release();
@ -153,7 +153,7 @@ void Signal_session_component::_destruct_context(Context * const c)
void Signal_session_component::_destruct_receiver(Receiver * const r)
{
/* release kernel resources */
if (Kernel::kill_signal_receiver(r->id()))
if (Kernel::bin_signal_receiver(r->id()))
{
/* clean-up */
r->release();