hw: move Thread::_processor to Execution_context

ref #1078
This commit is contained in:
Martin Stein 2014-02-28 12:20:26 +01:00 committed by Norman Feske
parent 6a3368ee27
commit 7cea03f695
3 changed files with 11 additions and 7 deletions

View File

@ -23,6 +23,8 @@
namespace Kernel namespace Kernel
{ {
class Processor;
/** /**
* Inheritable ability for objects of type T to be item in a double list * Inheritable ability for objects of type T to be item in a double list
*/ */
@ -295,6 +297,10 @@ class Kernel::Scheduler
class Kernel::Execution_context : public Cpu_scheduler::Item class Kernel::Execution_context : public Cpu_scheduler::Item
{ {
protected:
Processor * _processor;
public: public:
/** /**

View File

@ -38,8 +38,6 @@ namespace Kernel
class Thread_ids : public Id_allocator<MAX_THREADS> { }; class Thread_ids : public Id_allocator<MAX_THREADS> { };
typedef Object_pool<Thread> Thread_pool; typedef Object_pool<Thread> Thread_pool;
class Processor;
Thread_ids * thread_ids(); Thread_ids * thread_ids();
Thread_pool * thread_pool(); Thread_pool * thread_pool();
@ -102,7 +100,6 @@ class Kernel::Thread
Native_utcb * _utcb_phys; Native_utcb * _utcb_phys;
Signal_receiver * _signal_receiver; Signal_receiver * _signal_receiver;
char const * const _label; char const * const _label;
Processor * _processor;
/** /**
* Notice that another thread yielded the CPU to this thread * Notice that another thread yielded the CPU to this thread

View File

@ -49,7 +49,6 @@ class Kernel::Vm : public Object<Vm, MAX_VMS, Vm_ids, vm_ids, vm_pool>,
Genode::addr_t dfar; Genode::addr_t dfar;
}; };
Processor * const _processor;
Vm_state * const _state; Vm_state * const _state;
Signal_context * const _context; Signal_context * const _context;
@ -65,9 +64,11 @@ class Kernel::Vm : public Object<Vm, MAX_VMS, Vm_ids, vm_ids, vm_pool>,
Signal_context * const context) Signal_context * const context)
: :
Execution_context(Priority::MIN), Execution_context(Priority::MIN),
_processor(multiprocessor()->primary()), _state((Vm_state * const)state),
_state((Vm_state * const)state), _context(context) _context(context)
{ } {
_processor = multiprocessor()->primary();
}
/**************** /****************