mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
hw: rename bin_* syscalls with delete_*
The verb "bin" in the context of destroying kernel objects seems pretty unusual in contrast to "delete". When reading "bin" in the context of systems software an association to something like "binary" is more likely. Ref #1443
This commit is contained in:
parent
b949489641
commit
2df86cd34b
@ -30,24 +30,24 @@ namespace Kernel
|
||||
/**
|
||||
* Kernel names of the kernel calls
|
||||
*/
|
||||
constexpr Call_arg call_id_new_thread() { return 14; }
|
||||
constexpr Call_arg call_id_bin_thread() { return 15; }
|
||||
constexpr Call_arg call_id_start_thread() { return 16; }
|
||||
constexpr Call_arg call_id_resume_thread() { return 17; }
|
||||
constexpr Call_arg call_id_access_thread_regs() { return 18; }
|
||||
constexpr Call_arg call_id_route_thread_event() { return 19; }
|
||||
constexpr Call_arg call_id_update_pd() { return 20; }
|
||||
constexpr Call_arg call_id_new_pd() { return 21; }
|
||||
constexpr Call_arg call_id_bin_pd() { return 22; }
|
||||
constexpr Call_arg call_id_new_signal_receiver() { return 23; }
|
||||
constexpr Call_arg call_id_new_signal_context() { return 24; }
|
||||
constexpr Call_arg call_id_bin_signal_context() { return 25; }
|
||||
constexpr Call_arg call_id_bin_signal_receiver() { return 26; }
|
||||
constexpr Call_arg call_id_new_vm() { return 27; }
|
||||
constexpr Call_arg call_id_run_vm() { return 28; }
|
||||
constexpr Call_arg call_id_pause_vm() { return 29; }
|
||||
constexpr Call_arg call_id_pause_thread() { return 30; }
|
||||
constexpr Call_arg call_id_bin_vm() { return 31; }
|
||||
constexpr Call_arg call_id_new_thread() { return 14; }
|
||||
constexpr Call_arg call_id_delete_thread() { return 15; }
|
||||
constexpr Call_arg call_id_start_thread() { return 16; }
|
||||
constexpr Call_arg call_id_resume_thread() { return 17; }
|
||||
constexpr Call_arg call_id_access_thread_regs() { return 18; }
|
||||
constexpr Call_arg call_id_route_thread_event() { return 19; }
|
||||
constexpr Call_arg call_id_update_pd() { return 20; }
|
||||
constexpr Call_arg call_id_new_pd() { return 21; }
|
||||
constexpr Call_arg call_id_delete_pd() { return 22; }
|
||||
constexpr Call_arg call_id_new_signal_receiver() { return 23; }
|
||||
constexpr Call_arg call_id_new_signal_context() { return 24; }
|
||||
constexpr Call_arg call_id_delete_signal_context() { return 25; }
|
||||
constexpr Call_arg call_id_delete_signal_receiver() { return 26; }
|
||||
constexpr Call_arg call_id_new_vm() { return 27; }
|
||||
constexpr Call_arg call_id_run_vm() { return 28; }
|
||||
constexpr Call_arg call_id_pause_vm() { return 29; }
|
||||
constexpr Call_arg call_id_pause_thread() { return 30; }
|
||||
constexpr Call_arg call_id_delete_vm() { return 31; }
|
||||
|
||||
/**
|
||||
* Create a domain
|
||||
@ -72,9 +72,9 @@ namespace Kernel
|
||||
* \retval 0 succeeded
|
||||
* \retval -1 failed
|
||||
*/
|
||||
inline int bin_pd(unsigned const pd_id)
|
||||
inline int delete_pd(unsigned const pd_id)
|
||||
{
|
||||
return call(call_id_bin_pd(), pd_id);
|
||||
return call(call_id_delete_pd(), pd_id);
|
||||
}
|
||||
|
||||
|
||||
@ -128,9 +128,9 @@ namespace Kernel
|
||||
*
|
||||
* \param thread_id kernel name of the targeted thread
|
||||
*/
|
||||
inline void bin_thread(unsigned const thread_id)
|
||||
inline void delete_thread(unsigned const thread_id)
|
||||
{
|
||||
call(call_id_bin_thread(), thread_id);
|
||||
call(call_id_delete_thread(), thread_id);
|
||||
}
|
||||
|
||||
|
||||
@ -267,9 +267,9 @@ namespace Kernel
|
||||
* \retval 0 suceeded
|
||||
* \retval -1 failed
|
||||
*/
|
||||
inline int bin_signal_context(unsigned const context)
|
||||
inline int delete_signal_context(unsigned const context)
|
||||
{
|
||||
return call(call_id_bin_signal_context(), context);
|
||||
return call(call_id_delete_signal_context(), context);
|
||||
}
|
||||
|
||||
|
||||
@ -281,9 +281,9 @@ namespace Kernel
|
||||
* \retval 0 suceeded
|
||||
* \retval -1 failed
|
||||
*/
|
||||
inline int bin_signal_receiver(unsigned const receiver)
|
||||
inline int delete_signal_receiver(unsigned const receiver)
|
||||
{
|
||||
return call(call_id_bin_signal_receiver(), receiver);
|
||||
return call(call_id_delete_signal_receiver(), receiver);
|
||||
}
|
||||
|
||||
|
||||
@ -332,9 +332,9 @@ namespace Kernel
|
||||
* \retval 0 suceeded
|
||||
* \retval -1 failed
|
||||
*/
|
||||
inline int bin_vm(unsigned const vm_id)
|
||||
inline int delete_vm(unsigned const vm_id)
|
||||
{
|
||||
return call(call_id_bin_vm(), vm_id);
|
||||
return call(call_id_delete_vm(), vm_id);
|
||||
}
|
||||
|
||||
|
||||
|
@ -209,9 +209,9 @@ class Kernel::Thread
|
||||
*********************************************************/
|
||||
|
||||
void _call_new_pd();
|
||||
void _call_bin_pd();
|
||||
void _call_delete_pd();
|
||||
void _call_new_thread();
|
||||
void _call_bin_thread();
|
||||
void _call_delete_thread();
|
||||
void _call_start_thread();
|
||||
void _call_pause_current_thread();
|
||||
void _call_pause_thread();
|
||||
@ -232,10 +232,10 @@ class Kernel::Thread
|
||||
void _call_submit_signal();
|
||||
void _call_ack_signal();
|
||||
void _call_kill_signal_context();
|
||||
void _call_bin_signal_context();
|
||||
void _call_bin_signal_receiver();
|
||||
void _call_delete_signal_context();
|
||||
void _call_delete_signal_receiver();
|
||||
void _call_new_vm();
|
||||
void _call_bin_vm();
|
||||
void _call_delete_vm();
|
||||
void _call_run_vm();
|
||||
void _call_pause_vm();
|
||||
void _call_access_thread_regs();
|
||||
|
@ -223,7 +223,7 @@ void Thread::_call_new_pd()
|
||||
}
|
||||
|
||||
|
||||
void Thread::_call_bin_pd()
|
||||
void Thread::_call_delete_pd()
|
||||
{
|
||||
/* lookup protection domain */
|
||||
unsigned id = user_arg_1();
|
||||
@ -255,7 +255,7 @@ void Thread::_call_new_thread()
|
||||
}
|
||||
|
||||
|
||||
void Thread::_call_bin_thread()
|
||||
void Thread::_call_delete_thread()
|
||||
{
|
||||
/* lookup thread */
|
||||
Thread * const thread = Thread::pool()->object(user_arg_1());
|
||||
@ -761,7 +761,7 @@ void Thread::_call_kill_signal_context()
|
||||
}
|
||||
|
||||
|
||||
void Thread::_call_bin_signal_context()
|
||||
void Thread::_call_delete_signal_context()
|
||||
{
|
||||
/* lookup signal context */
|
||||
unsigned const id = user_arg_1();
|
||||
@ -778,7 +778,7 @@ void Thread::_call_bin_signal_context()
|
||||
}
|
||||
|
||||
|
||||
void Thread::_call_bin_signal_receiver()
|
||||
void Thread::_call_delete_signal_receiver()
|
||||
{
|
||||
/* lookup signal receiver */
|
||||
unsigned const id = user_arg_1();
|
||||
@ -850,24 +850,24 @@ void Thread::_call()
|
||||
}
|
||||
/* switch over kernel calls that are restricted to core */
|
||||
switch (call_id) {
|
||||
case call_id_new_thread(): _call_new_thread(); return;
|
||||
case call_id_bin_thread(): _call_bin_thread(); return;
|
||||
case call_id_start_thread(): _call_start_thread(); return;
|
||||
case call_id_resume_thread(): _call_resume_thread(); return;
|
||||
case call_id_access_thread_regs(): _call_access_thread_regs(); return;
|
||||
case call_id_route_thread_event(): _call_route_thread_event(); return;
|
||||
case call_id_update_pd(): _call_update_pd(); return;
|
||||
case call_id_new_pd(): _call_new_pd(); return;
|
||||
case call_id_bin_pd(): _call_bin_pd(); 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_bin_signal_context(): _call_bin_signal_context(); return;
|
||||
case call_id_bin_signal_receiver(): _call_bin_signal_receiver(); return;
|
||||
case call_id_new_vm(): _call_new_vm(); return;
|
||||
case call_id_bin_vm(): _call_bin_vm(); return;
|
||||
case call_id_run_vm(): _call_run_vm(); return;
|
||||
case call_id_pause_vm(): _call_pause_vm(); return;
|
||||
case call_id_pause_thread(): _call_pause_thread(); return;
|
||||
case call_id_new_thread(): _call_new_thread(); return;
|
||||
case call_id_delete_thread(): _call_delete_thread(); return;
|
||||
case call_id_start_thread(): _call_start_thread(); return;
|
||||
case call_id_resume_thread(): _call_resume_thread(); return;
|
||||
case call_id_access_thread_regs(): _call_access_thread_regs(); return;
|
||||
case call_id_route_thread_event(): _call_route_thread_event(); return;
|
||||
case call_id_update_pd(): _call_update_pd(); return;
|
||||
case call_id_new_pd(): _call_new_pd(); return;
|
||||
case call_id_delete_pd(): _call_delete_pd(); 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_delete_signal_context(): _call_delete_signal_context(); return;
|
||||
case call_id_delete_signal_receiver(): _call_delete_signal_receiver(); return;
|
||||
case call_id_new_vm(): _call_new_vm(); return;
|
||||
case call_id_delete_vm(): _call_delete_vm(); return;
|
||||
case call_id_run_vm(): _call_run_vm(); return;
|
||||
case call_id_pause_vm(): _call_pause_vm(); return;
|
||||
case call_id_pause_thread(): _call_pause_thread(); return;
|
||||
default:
|
||||
PWRN("%s -> %s: unknown kernel call", pd_label(), label());
|
||||
_stop();
|
||||
|
@ -14,7 +14,7 @@
|
||||
/* core includes */
|
||||
#include <kernel/thread.h>
|
||||
|
||||
void Kernel::Thread::_call_new_vm() { user_arg_0(0); }
|
||||
void Kernel::Thread::_call_bin_vm() { user_arg_0(-1); }
|
||||
void Kernel::Thread::_call_run_vm() { user_arg_0(-1); }
|
||||
void Kernel::Thread::_call_pause_vm() { user_arg_0(-1); }
|
||||
void Kernel::Thread::_call_new_vm() { user_arg_0(0); }
|
||||
void Kernel::Thread::_call_delete_vm() { user_arg_0(-1); }
|
||||
void Kernel::Thread::_call_run_vm() { user_arg_0(-1); }
|
||||
void Kernel::Thread::_call_pause_vm() { user_arg_0(-1); }
|
||||
|
@ -21,7 +21,7 @@ Platform_pd::~Platform_pd()
|
||||
{
|
||||
Lock::Guard guard(_lock);
|
||||
|
||||
if (Kernel::bin_pd(_id)) {
|
||||
if (Kernel::delete_pd(_id)) {
|
||||
PERR("failed to destruct protection domain at kernel");
|
||||
}
|
||||
|
||||
@ -30,4 +30,3 @@ Platform_pd::~Platform_pd()
|
||||
|
||||
/* TODO: destroy page slab and translation table!!! */
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ Platform_thread::~Platform_thread()
|
||||
rm->remove_client(cap);
|
||||
}
|
||||
/* destroy object at the kernel */
|
||||
Kernel::bin_thread(_id);
|
||||
Kernel::delete_thread(_id);
|
||||
}
|
||||
|
||||
|
||||
|
@ -112,7 +112,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::bin_signal_context(c->id()))
|
||||
if (Kernel::delete_signal_context(c->id()))
|
||||
{
|
||||
/* clean-up */
|
||||
c->release();
|
||||
@ -128,7 +128,7 @@ void Signal_session_component::_destruct_context(Context * const c)
|
||||
void Signal_session_component::_destruct_receiver(Receiver * const r)
|
||||
{
|
||||
/* release kernel resources */
|
||||
if (Kernel::bin_signal_receiver(r->id()))
|
||||
if (Kernel::delete_signal_receiver(r->id()))
|
||||
{
|
||||
/* clean-up */
|
||||
r->release();
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <kernel/thread.h>
|
||||
#include <kernel/vm.h>
|
||||
|
||||
void Kernel::Thread::_call_bin_vm()
|
||||
void Kernel::Thread::_call_delete_vm()
|
||||
{
|
||||
Vm * const vm = Vm::pool()->object(user_arg_1());
|
||||
if (vm) vm->~Vm();
|
||||
|
@ -49,7 +49,7 @@ Vm_session_component::~Vm_session_component()
|
||||
/* dissolve VM dataspace from service entry point */
|
||||
_ds_ep->dissolve(&_ds);
|
||||
|
||||
if (Kernel::bin_vm(_vm_id)) PERR("Cannot destruct unknown VM");
|
||||
if (Kernel::delete_vm(_vm_id)) PERR("Cannot destruct unknown VM");
|
||||
|
||||
/* free region in allocator */
|
||||
core_env()->rm_session()->detach(_ds.core_local_addr());
|
||||
|
Loading…
Reference in New Issue
Block a user