From fde150b052cd552b69ce67554b0c619dc2a23281 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Mon, 18 Nov 2013 17:00:33 +0100 Subject: [PATCH] hw: rename delete_thread in kill_thread ref #953 --- base-hw/include/kernel/interface.h | 14 ++++++-------- base-hw/src/core/kernel/thread.cc | 4 ++-- base-hw/src/core/kernel/thread.h | 2 +- base-hw/src/core/platform_thread.cc | 2 +- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/base-hw/include/kernel/interface.h b/base-hw/include/kernel/interface.h index a67eae1640..cfdc6aad10 100644 --- a/base-hw/include/kernel/interface.h +++ b/base-hw/include/kernel/interface.h @@ -39,7 +39,7 @@ namespace Kernel { enum { NEW_THREAD = 0, - DELETE_THREAD = 1, + KILL_THREAD = 1, START_THREAD = 2, PAUSE_THREAD = 3, RESUME_THREAD = 4, @@ -218,17 +218,15 @@ namespace Kernel /** - * Delete an existing thread + * Destruct kernel thread-object * - * \param id kernel name of the targeted thread + * \param thread_id kernel name of the targeted thread * - * Restricted to core threads. After calling this, the memory that was - * granted beforehand by 'new_thread' to kernel for managing this thread - * is freed again. + * Restricted to core threads. */ - inline void delete_thread(unsigned const thread_id) + inline void kill_thread(unsigned const thread_id) { - call(Call_id::DELETE_THREAD, thread_id); + call(Call_id::KILL_THREAD, thread_id); } diff --git a/base-hw/src/core/kernel/thread.cc b/base-hw/src/core/kernel/thread.cc index f39b931417..b29181cf8c 100644 --- a/base-hw/src/core/kernel/thread.cc +++ b/base-hw/src/core/kernel/thread.cc @@ -338,7 +338,7 @@ void Thread::_call_new_thread() } -void Thread::_call_delete_thread() +void Thread::_call_kill_thread() { /* check permissions */ assert(_core()); @@ -866,7 +866,7 @@ void Thread::_call() { switch (user_arg_0()) { case Call_id::NEW_THREAD: _call_new_thread(); return; - case Call_id::DELETE_THREAD: _call_delete_thread(); return; + case Call_id::KILL_THREAD: _call_kill_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; diff --git a/base-hw/src/core/kernel/thread.h b/base-hw/src/core/kernel/thread.h index 40b1759133..1e3174fcc3 100644 --- a/base-hw/src/core/kernel/thread.h +++ b/base-hw/src/core/kernel/thread.h @@ -185,7 +185,7 @@ class Kernel::Thread void _call_new_pd(); void _call_kill_pd(); void _call_new_thread(); - void _call_delete_thread(); + void _call_kill_thread(); void _call_start_thread(); void _call_pause_thread(); void _call_resume_thread(); diff --git a/base-hw/src/core/platform_thread.cc b/base-hw/src/core/platform_thread.cc index 4189fe8414..e75ceb4c18 100644 --- a/base-hw/src/core/platform_thread.cc +++ b/base-hw/src/core/platform_thread.cc @@ -69,7 +69,7 @@ Platform_thread::~Platform_thread() rm->remove_client(cap); } /* destroy object at the kernel */ - Kernel::delete_thread(_id); + Kernel::kill_thread(_id); }