From 7cea03f695a487300b2142388fab9469f94a0c4c Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Fri, 28 Feb 2014 12:20:26 +0100 Subject: [PATCH] hw: move Thread::_processor to Execution_context ref #1078 --- base-hw/src/core/kernel/scheduler.h | 6 ++++++ base-hw/src/core/kernel/thread.h | 3 --- base-hw/src/core/kernel/vm.h | 9 +++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/base-hw/src/core/kernel/scheduler.h b/base-hw/src/core/kernel/scheduler.h index fe7e24cb8b..a09253cd4f 100644 --- a/base-hw/src/core/kernel/scheduler.h +++ b/base-hw/src/core/kernel/scheduler.h @@ -23,6 +23,8 @@ namespace Kernel { + class Processor; + /** * 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 { + protected: + + Processor * _processor; + public: /** diff --git a/base-hw/src/core/kernel/thread.h b/base-hw/src/core/kernel/thread.h index 27afb3db7c..c426415f1e 100644 --- a/base-hw/src/core/kernel/thread.h +++ b/base-hw/src/core/kernel/thread.h @@ -38,8 +38,6 @@ namespace Kernel class Thread_ids : public Id_allocator { }; typedef Object_pool Thread_pool; - class Processor; - Thread_ids * thread_ids(); Thread_pool * thread_pool(); @@ -102,7 +100,6 @@ class Kernel::Thread Native_utcb * _utcb_phys; Signal_receiver * _signal_receiver; char const * const _label; - Processor * _processor; /** * Notice that another thread yielded the CPU to this thread diff --git a/base-hw/src/core/kernel/vm.h b/base-hw/src/core/kernel/vm.h index 4c12413317..ac33eb1cf6 100644 --- a/base-hw/src/core/kernel/vm.h +++ b/base-hw/src/core/kernel/vm.h @@ -49,7 +49,6 @@ class Kernel::Vm : public Object, Genode::addr_t dfar; }; - Processor * const _processor; Vm_state * const _state; Signal_context * const _context; @@ -65,9 +64,11 @@ class Kernel::Vm : public Object, Signal_context * const context) : Execution_context(Priority::MIN), - _processor(multiprocessor()->primary()), - _state((Vm_state * const)state), _context(context) - { } + _state((Vm_state * const)state), + _context(context) + { + _processor = multiprocessor()->primary(); + } /****************