mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-12 05:41:36 +00:00
parent
010e00ae7a
commit
17f17df74b
@ -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()
|
||||
|
@ -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();
|
||||
|
@ -57,9 +57,9 @@ namespace Kernel
|
||||
/**
|
||||
* Kernel object that can be scheduled for the CPU
|
||||
*/
|
||||
class Execution_context;
|
||||
class Processor_client;
|
||||
|
||||
typedef Scheduler<Execution_context> Processor_scheduler;
|
||||
typedef Scheduler<Processor_client> Processor_scheduler;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@ -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_ */
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
@ -71,7 +71,7 @@ class Kernel::Thread
|
||||
:
|
||||
public Processor_driver::User_context,
|
||||
public Object<Thread, MAX_THREADS, Thread_ids, thread_ids, thread_pool>,
|
||||
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);
|
||||
|
@ -39,7 +39,7 @@ namespace Kernel
|
||||
}
|
||||
|
||||
class Kernel::Vm : public Object<Vm, MAX_VMS, Vm_ids, vm_ids, vm_pool>,
|
||||
public Execution_context
|
||||
public Processor_client
|
||||
{
|
||||
private:
|
||||
|
||||
@ -62,7 +62,7 @@ class Kernel::Vm : public Object<Vm, MAX_VMS, Vm_ids, vm_ids, vm_pool>,
|
||||
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, MAX_VMS, Vm_ids, vm_ids, vm_pool>,
|
||||
** 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<Vm, MAX_VMS, Vm_ids, vm_ids, vm_pool>,
|
||||
case Genode::Cpu_state::DATA_ABORT:
|
||||
_state->dfar = Processor::Dfar::read();
|
||||
default:
|
||||
Execution_context::_unschedule();
|
||||
Processor_client::_unschedule();
|
||||
_context->submit(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user