From 17f17df74b75012c4a4e7dba0318792206eee908 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Mon, 10 Mar 2014 22:22:50 +0100 Subject: [PATCH] hw: rename Execution_context in Processor_client ref #1088 --- base-hw/src/core/kernel/kernel.cc | 6 +++--- base-hw/src/core/kernel/scheduler.cc | 8 ++++---- base-hw/src/core/kernel/scheduler.h | 10 +++++----- base-hw/src/core/kernel/thread.cc | 12 ++++++------ base-hw/src/core/kernel/thread.h | 8 ++++---- base-hw/src/core/kernel/vm.h | 16 ++++++++-------- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/base-hw/src/core/kernel/kernel.cc b/base-hw/src/core/kernel/kernel.cc index 35bf8d58dc..df66b66c67 100644 --- a/base-hw/src/core/kernel/kernel.cc +++ b/base-hw/src/core/kernel/kernel.cc @@ -291,7 +291,7 @@ extern "C" void kernel() * scheduling of the local activities in a way that an update would return * an occupant other than that whose exception caused the kernel entry. */ - Execution_context * const old_occupant = scheduler->occupant(); + Processor_client * const old_occupant = scheduler->occupant(); old_occupant->exception(processor_id); /* @@ -299,7 +299,7 @@ extern "C" void kernel() * changed the scheduling of the local activities. Hence we must update the * processor occupant. */ - Execution_context * const new_occupant = scheduler->update_occupant(); + Processor_client * const new_occupant = scheduler->update_occupant(); if (old_occupant != new_occupant) { reset_scheduling_time(processor_id); } new_occupant->proceed(processor_id); } @@ -315,7 +315,7 @@ Kernel::Mode_transition_control * Kernel::mtc() } -Kernel::Execution_context::~Execution_context() { } +Kernel::Processor_client::~Processor_client() { } Kernel::Cpu_context::Cpu_context() diff --git a/base-hw/src/core/kernel/scheduler.cc b/base-hw/src/core/kernel/scheduler.cc index 31ecae781e..7e0933521f 100644 --- a/base-hw/src/core/kernel/scheduler.cc +++ b/base-hw/src/core/kernel/scheduler.cc @@ -26,7 +26,7 @@ namespace Kernel } -void Kernel::Execution_context::_interrupt(unsigned const processor_id) +void Kernel::Processor_client::_interrupt(unsigned const processor_id) { /* determine handling for specific interrupt */ unsigned irq_id; @@ -61,7 +61,7 @@ void Kernel::Execution_context::_interrupt(unsigned const processor_id) } -void Kernel::Execution_context::_schedule() +void Kernel::Processor_client::_schedule() { /* schedule thread */ __processor->scheduler()->insert(this); @@ -74,14 +74,14 @@ void Kernel::Execution_context::_schedule() } -void Kernel::Execution_context::_unschedule() +void Kernel::Processor_client::_unschedule() { assert(__processor->id() == Processor::executing_id()); __processor->scheduler()->remove(this); } -void Kernel::Execution_context::_yield() +void Kernel::Processor_client::_yield() { assert(__processor->id() == Processor::executing_id()); __processor->scheduler()->yield_occupation(); diff --git a/base-hw/src/core/kernel/scheduler.h b/base-hw/src/core/kernel/scheduler.h index 36e8a74d12..b357439a1e 100644 --- a/base-hw/src/core/kernel/scheduler.h +++ b/base-hw/src/core/kernel/scheduler.h @@ -57,9 +57,9 @@ namespace Kernel /** * Kernel object that can be scheduled for the CPU */ - class Execution_context; + class Processor_client; - typedef Scheduler Processor_scheduler; + typedef Scheduler Processor_scheduler; } template @@ -299,7 +299,7 @@ class Kernel::Scheduler T * idle() const { return _idle; } }; -class Kernel::Execution_context : public Processor_scheduler::Item +class Kernel::Processor_client : public Processor_scheduler::Item { private: @@ -361,7 +361,7 @@ class Kernel::Execution_context : public Processor_scheduler::Item * \param processor kernel object of targeted processor * \param priority scheduling priority */ - Execution_context(Processor * const processor, Priority const priority) + Processor_client(Processor * const processor, Priority const priority) : Processor_scheduler::Item(priority), __processor(processor) @@ -370,7 +370,7 @@ class Kernel::Execution_context : public Processor_scheduler::Item /** * Destructor */ - virtual ~Execution_context(); + virtual ~Processor_client(); }; #endif /* _KERNEL__SCHEDULER_H_ */ diff --git a/base-hw/src/core/kernel/thread.cc b/base-hw/src/core/kernel/thread.cc index 28793865d8..48bf1c4e9a 100644 --- a/base-hw/src/core/kernel/thread.cc +++ b/base-hw/src/core/kernel/thread.cc @@ -164,21 +164,21 @@ void Thread::_pause() void Thread::_schedule() { if (_state == SCHEDULED) { return; } - Execution_context::_schedule(); + Processor_client::_schedule(); _state = SCHEDULED; } void Thread::_unschedule(State const s) { - if (_state == SCHEDULED) { Execution_context::_unschedule(); } + if (_state == SCHEDULED) { Processor_client::_unschedule(); } _state = s; } Thread::Thread(unsigned const priority, char const * const label) : - Execution_context(0, priority), + Processor_client(0, priority), Thread_cpu_support(this), _state(AWAITS_START), _pd(0), @@ -189,7 +189,7 @@ Thread::Thread(unsigned const priority, char const * const label) cpu_exception = RESET; } -Thread::~Thread() { if (Execution_context::list()) { _unschedule(STOPPED); } } +Thread::~Thread() { if (Processor_client::list()) { _unschedule(STOPPED); } } void @@ -199,7 +199,7 @@ Thread::init(Processor * const processor, unsigned const pd_id_arg, assert(_state == AWAITS_START) /* store thread parameters */ - Execution_context::_processor(processor); + Processor_client::_processor(processor); _utcb_phys = utcb_phys; /* join protection domain */ @@ -447,7 +447,7 @@ void Thread::_call_yield_thread() { Thread * const t = Thread::pool()->object(user_arg_1()); if (t) { t->_receive_yielded_cpu(); } - Execution_context::_yield(); + Processor_client::_yield(); } diff --git a/base-hw/src/core/kernel/thread.h b/base-hw/src/core/kernel/thread.h index 9a831e0db8..f8754ee356 100644 --- a/base-hw/src/core/kernel/thread.h +++ b/base-hw/src/core/kernel/thread.h @@ -71,7 +71,7 @@ class Kernel::Thread : public Processor_driver::User_context, public Object, - public Execution_context, + public Processor_client, public Ipc_node, public Signal_context_killer, public Signal_handler, @@ -315,9 +315,9 @@ class Kernel::Thread Native_utcb * const utcb, bool const start); - /*********************** - ** Execution_context ** - ***********************/ + /********************** + ** Processor_client ** + **********************/ void exception(unsigned const processor_id); void proceed(unsigned const processor_id); diff --git a/base-hw/src/core/kernel/vm.h b/base-hw/src/core/kernel/vm.h index 299b2e0d74..8d8dc17775 100644 --- a/base-hw/src/core/kernel/vm.h +++ b/base-hw/src/core/kernel/vm.h @@ -39,7 +39,7 @@ namespace Kernel } class Kernel::Vm : public Object, - public Execution_context + public Processor_client { private: @@ -62,7 +62,7 @@ class Kernel::Vm : public Object, Vm(void * const state, Signal_context * const context) : - Execution_context(processor_pool()->primary(), Priority::MIN), + Processor_client(processor_pool()->primary(), Priority::MIN), _state((Vm_state * const)state), _context(context) { } @@ -72,14 +72,14 @@ class Kernel::Vm : public Object, ** Vm_session ** ****************/ - void run() { Execution_context::_schedule(); } + void run() { Processor_client::_schedule(); } - void pause() { Execution_context::_unschedule(); } + void pause() { Processor_client::_unschedule(); } - /*********************** - ** Execution_context ** - ***********************/ + /********************** + ** Processor_client ** + **********************/ void exception(unsigned const processor_id) { @@ -91,7 +91,7 @@ class Kernel::Vm : public Object, case Genode::Cpu_state::DATA_ABORT: _state->dfar = Processor::Dfar::read(); default: - Execution_context::_unschedule(); + Processor_client::_unschedule(); _context->submit(1); } }