diff --git a/repos/base-foc/include/foc_native_cpu/client.h b/repos/base-foc/include/foc_native_cpu/client.h index 22db880a13..aeaf08407e 100644 --- a/repos/base-foc/include/foc_native_cpu/client.h +++ b/repos/base-foc/include/foc_native_cpu/client.h @@ -21,10 +21,10 @@ namespace Genode { struct Foc_native_cpu_client; } -struct Genode::Foc_native_cpu_client : Rpc_client +struct Genode::Foc_native_cpu_client : Rpc_client { explicit Foc_native_cpu_client(Capability cap) - : Rpc_client(static_cap_cast(cap)) { } + : Rpc_client(cap) { } Native_capability native_cap(Thread_capability cap) override { return call(cap); } diff --git a/repos/base-foc/include/foc_native_cpu/foc_native_cpu.h b/repos/base-foc/include/foc_native_cpu/foc_native_cpu.h index 10c4fe43dc..d3ec545353 100644 --- a/repos/base-foc/include/foc_native_cpu/foc_native_cpu.h +++ b/repos/base-foc/include/foc_native_cpu/foc_native_cpu.h @@ -19,10 +19,8 @@ #include #include -namespace Genode { struct Foc_native_cpu; } - -struct Genode::Foc_native_cpu : Cpu_session::Native_cpu +struct Genode::Cpu_session::Native_cpu : Interface { virtual Native_capability native_cap(Thread_capability) = 0; virtual Foc_thread_state thread_state(Thread_capability) = 0; diff --git a/repos/base-foc/src/core/include/native_cpu_component.h b/repos/base-foc/src/core/include/native_cpu_component.h index c1b309d250..8fd21ad7f9 100644 --- a/repos/base-foc/src/core/include/native_cpu_component.h +++ b/repos/base-foc/src/core/include/native_cpu_component.h @@ -25,7 +25,7 @@ namespace Genode { } -class Genode::Native_cpu_component : public Rpc_object { private: diff --git a/repos/base-linux/src/core/include/native_cpu_component.h b/repos/base-linux/src/core/include/native_cpu_component.h index 569a8fdf7f..adf2927cc5 100644 --- a/repos/base-linux/src/core/include/native_cpu_component.h +++ b/repos/base-linux/src/core/include/native_cpu_component.h @@ -25,7 +25,7 @@ namespace Genode { } -class Genode::Native_cpu_component : public Rpc_object { private: diff --git a/repos/base-linux/src/include/linux_native_cpu/client.h b/repos/base-linux/src/include/linux_native_cpu/client.h index 1e3c4798c3..f365006776 100644 --- a/repos/base-linux/src/include/linux_native_cpu/client.h +++ b/repos/base-linux/src/include/linux_native_cpu/client.h @@ -20,10 +20,10 @@ namespace Genode { struct Linux_native_cpu_client; } -struct Genode::Linux_native_cpu_client : Rpc_client +struct Genode::Linux_native_cpu_client : Rpc_client { - explicit Linux_native_cpu_client(Capability cap) - : Rpc_client(static_cap_cast(cap)) { } + explicit Linux_native_cpu_client(Capability cap) + : Rpc_client(cap) { } void thread_id(Thread_capability thread, int pid, int tid) override { call(thread, pid, tid); } diff --git a/repos/base-linux/src/include/linux_native_cpu/linux_native_cpu.h b/repos/base-linux/src/include/linux_native_cpu/linux_native_cpu.h index 5069408bc1..36ffa5342c 100644 --- a/repos/base-linux/src/include/linux_native_cpu/linux_native_cpu.h +++ b/repos/base-linux/src/include/linux_native_cpu/linux_native_cpu.h @@ -17,10 +17,8 @@ #include #include -namespace Genode { struct Linux_native_cpu; } - -struct Genode::Linux_native_cpu : Cpu_session::Native_cpu +struct Genode::Cpu_session::Native_cpu : Interface { /** * Register Linux PID and TID of the specified thread diff --git a/repos/base-nova/include/nova_native_cpu/client.h b/repos/base-nova/include/nova_native_cpu/client.h index 3385718055..dec9562de7 100644 --- a/repos/base-nova/include/nova_native_cpu/client.h +++ b/repos/base-nova/include/nova_native_cpu/client.h @@ -20,10 +20,10 @@ namespace Genode { struct Nova_native_cpu_client; } -struct Genode::Nova_native_cpu_client : Rpc_client +struct Genode::Nova_native_cpu_client : Rpc_client { - explicit Nova_native_cpu_client(Capability cap) - : Rpc_client(static_cap_cast(cap)) { } + explicit Nova_native_cpu_client(Capability cap) + : Rpc_client(cap) { } void thread_type(Thread_capability thread_cap, Thread_type thread_type, Exception_base exception_base) override { diff --git a/repos/base-nova/include/nova_native_cpu/nova_native_cpu.h b/repos/base-nova/include/nova_native_cpu/nova_native_cpu.h index 8c1851ae61..3c139369ed 100644 --- a/repos/base-nova/include/nova_native_cpu/nova_native_cpu.h +++ b/repos/base-nova/include/nova_native_cpu/nova_native_cpu.h @@ -17,10 +17,8 @@ #include #include -namespace Genode { struct Nova_native_cpu; } - -struct Genode::Nova_native_cpu : Cpu_session::Native_cpu +struct Genode::Cpu_session::Native_cpu : Interface { enum Thread_type { GLOBAL, LOCAL, VCPU }; diff --git a/repos/base-nova/src/core/include/native_cpu_component.h b/repos/base-nova/src/core/include/native_cpu_component.h index 7dc41fd953..2a2ea83677 100644 --- a/repos/base-nova/src/core/include/native_cpu_component.h +++ b/repos/base-nova/src/core/include/native_cpu_component.h @@ -25,7 +25,7 @@ namespace Genode { } -class Genode::Native_cpu_component : public Rpc_object { private: diff --git a/repos/base-nova/src/core/include/native_pd_component.h b/repos/base-nova/src/core/include/native_pd_component.h index 85d351333e..98c1fcdde9 100644 --- a/repos/base-nova/src/core/include/native_pd_component.h +++ b/repos/base-nova/src/core/include/native_pd_component.h @@ -40,7 +40,7 @@ class Genode::Native_pd_component : public Rpc_object ~Native_pd_component(); /** - * Nova_native_pd interface + * Native_pd interface */ Native_capability alloc_rpc_cap(Native_capability, addr_t, addr_t) override; void imprint_rpc_cap(Native_capability, unsigned long) override; diff --git a/repos/base-nova/src/core/include/platform_thread.h b/repos/base-nova/src/core/include/platform_thread.h index f4df45154f..7b63fda5d9 100644 --- a/repos/base-nova/src/core/include/platform_thread.h +++ b/repos/base-nova/src/core/include/platform_thread.h @@ -146,8 +146,8 @@ namespace Genode { /** * Set thread type and exception portal base */ - void thread_type(Nova_native_cpu::Thread_type thread_type, - Nova_native_cpu::Exception_base exception_base); + void thread_type(Cpu_session::Native_cpu::Thread_type thread_type, + Cpu_session::Native_cpu::Exception_base exception_base); /** * Set pager diff --git a/repos/base-nova/src/core/include/rpc_cap_factory.h b/repos/base-nova/src/core/include/rpc_cap_factory.h index aa74debfff..25179eecfd 100644 --- a/repos/base-nova/src/core/include/rpc_cap_factory.h +++ b/repos/base-nova/src/core/include/rpc_cap_factory.h @@ -53,7 +53,7 @@ class Genode::Rpc_cap_factory * * \throw Allocator::Out_of_memory * - * This function is invoked via Nova_native_pd::alloc_rpc_cap. + * This function is invoked via Native_pd::alloc_rpc_cap. */ Native_capability alloc(Native_capability ep, addr_t entry, addr_t mtd); diff --git a/repos/base-nova/src/core/platform_thread.cc b/repos/base-nova/src/core/platform_thread.cc index 2f0fe08866..405b7825b5 100644 --- a/repos/base-nova/src/core/platform_thread.cc +++ b/repos/base-nova/src/core/platform_thread.cc @@ -335,19 +335,19 @@ void Platform_thread::pager(Pager_object &pager) } -void Platform_thread::thread_type(Nova_native_cpu::Thread_type thread_type, - Nova_native_cpu::Exception_base exception_base) +void Platform_thread::thread_type(Cpu_session::Native_cpu::Thread_type thread_type, + Cpu_session::Native_cpu::Exception_base exception_base) { /* you can do it only once */ if (_sel_exc_base != Native_thread::INVALID_INDEX) return; - if (!main_thread() || (thread_type == Nova_native_cpu::Thread_type::VCPU)) + if (!main_thread() || (thread_type == Cpu_session::Native_cpu::Thread_type::VCPU)) _sel_exc_base = exception_base.exception_base; - if (thread_type == Nova_native_cpu::Thread_type::LOCAL) + if (thread_type == Cpu_session::Native_cpu::Thread_type::LOCAL) _features |= WORKER; - else if (thread_type == Nova_native_cpu::Thread_type::VCPU) + else if (thread_type == Cpu_session::Native_cpu::Thread_type::VCPU) _features |= VCPU; } diff --git a/repos/base-nova/src/lib/base/thread_start.cc b/repos/base-nova/src/lib/base/thread_start.cc index 2396b14c90..392ff5804d 100644 --- a/repos/base-nova/src/lib/base/thread_start.cc +++ b/repos/base-nova/src/lib/base/thread_start.cc @@ -151,14 +151,14 @@ void Thread::start() /* create EC at core */ try { - Nova_native_cpu::Thread_type thread_type; + Cpu_session::Native_cpu::Thread_type thread_type; if (global) - thread_type = Nova_native_cpu::Thread_type::GLOBAL; + thread_type = Cpu_session::Native_cpu::Thread_type::GLOBAL; else - thread_type = Nova_native_cpu::Thread_type::LOCAL; + thread_type = Cpu_session::Native_cpu::Thread_type::LOCAL; - Nova_native_cpu::Exception_base exception_base { native_thread().exc_pt_sel }; + Cpu_session::Native_cpu::Exception_base exception_base { native_thread().exc_pt_sel }; Nova_native_cpu_client native_cpu(_cpu_session->native_cpu()); native_cpu.thread_type(_thread_cap, thread_type, exception_base); @@ -175,7 +175,7 @@ void Thread::start() /* * Requested ec cap that is used for recall and - * creation of portals (Nova_native_pd::alloc_rpc_cap). + * creation of portals (Native_pd::alloc_rpc_cap). */ request_native_ec_cap(native_thread().exc_pt_sel + Nova::PT_SEL_PAGE_FAULT, native_thread().ec_sel); diff --git a/repos/base/include/cpu_session/cpu_session.h b/repos/base/include/cpu_session/cpu_session.h index 8b2253ca0c..e66deb293b 100644 --- a/repos/base/include/cpu_session/cpu_session.h +++ b/repos/base/include/cpu_session/cpu_session.h @@ -220,7 +220,7 @@ struct Genode::Cpu_session : Session /** * Common base class of kernel-specific CPU interfaces */ - struct Native_cpu : Interface { }; + struct Native_cpu; /** * Return capability to kernel-specific CPU operations diff --git a/repos/gems/src/lib/cpu_sampler_platform-foc/native_cpu.cc b/repos/gems/src/lib/cpu_sampler_platform-foc/native_cpu.cc index 01a7894b97..1282fdea99 100644 --- a/repos/gems/src/lib/cpu_sampler_platform-foc/native_cpu.cc +++ b/repos/gems/src/lib/cpu_sampler_platform-foc/native_cpu.cc @@ -28,7 +28,7 @@ namespace Cpu_sampler { using namespace Genode; -class Cpu_sampler::Native_cpu_component : public Rpc_object { private: diff --git a/repos/gems/src/lib/cpu_sampler_platform-nova/native_cpu.cc b/repos/gems/src/lib/cpu_sampler_platform-nova/native_cpu.cc index b910229a9f..1716a08c92 100644 --- a/repos/gems/src/lib/cpu_sampler_platform-nova/native_cpu.cc +++ b/repos/gems/src/lib/cpu_sampler_platform-nova/native_cpu.cc @@ -28,8 +28,8 @@ namespace Cpu_sampler { using namespace Genode; -class Cpu_sampler::Native_cpu_component : public Rpc_object +class Cpu_sampler::Native_cpu_component : public Rpc_object { private: @@ -51,8 +51,8 @@ class Cpu_sampler::Native_cpu_component : public Rpc_objectparent_thread(), diff --git a/repos/ports/include/vmm/vcpu_thread.h b/repos/ports/include/vmm/vcpu_thread.h index 5f96c42ca1..3c92d8b4a8 100644 --- a/repos/ports/include/vmm/vcpu_thread.h +++ b/repos/ports/include/vmm/vcpu_thread.h @@ -85,8 +85,8 @@ class Vmm::Vcpu_other_pd : public Vmm::Vcpu_thread }); /* tell parent that this will be a vCPU */ - Nova_native_cpu::Thread_type thread_type { Nova_native_cpu::Thread_type::VCPU }; - Nova_native_cpu::Exception_base exception_base { _exc_pt_sel }; + Cpu_session::Native_cpu::Thread_type thread_type { Cpu_session::Native_cpu::Thread_type::VCPU }; + Cpu_session::Native_cpu::Exception_base exception_base { _exc_pt_sel }; Nova_native_cpu_client native_cpu(_cpu_connection->native_cpu()); native_cpu.thread_type(vcpu_vm, thread_type, exception_base); diff --git a/repos/ports/src/lib/gdbserver_platform-nova/native_cpu.cc b/repos/ports/src/lib/gdbserver_platform-nova/native_cpu.cc index 9ab3cd9920..c5d916d221 100644 --- a/repos/ports/src/lib/gdbserver_platform-nova/native_cpu.cc +++ b/repos/ports/src/lib/gdbserver_platform-nova/native_cpu.cc @@ -28,7 +28,7 @@ namespace Gdb_monitor { using namespace Genode; -class Gdb_monitor::Native_cpu_component : public Rpc_object { private: @@ -51,8 +51,8 @@ class Gdb_monitor::Native_cpu_component : public Rpc_objectparent_thread_cap(),