From ee56a3101af03849f2f2e42ad58c49450e34b97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 30 Jun 2022 15:29:13 +0200 Subject: [PATCH] Made workers Genode threads. --- src/mx/tasking/worker.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mx/tasking/worker.h b/src/mx/tasking/worker.h index 1854357..d02622c 100644 --- a/src/mx/tasking/worker.h +++ b/src/mx/tasking/worker.h @@ -12,12 +12,13 @@ #include #include #include +#include namespace mx::tasking { /** * The worker executes tasks from his own channel, until the "running" flag is false. */ -class alignas(64) Worker +class alignas(64) Worker : Genode::Thread { public: Worker(std::uint16_t id, std::uint16_t target_core_id, std::uint16_t target_numa_node_id, @@ -27,6 +28,12 @@ public: ~Worker() noexcept = default; + /** + * @brief Entry point for Genode thread + * + */ + void entry() override { this->execute(); } + /** * Starts the worker (typically in its own thread). */ @@ -41,6 +48,7 @@ public: [[nodiscard]] const Channel &channel() const noexcept { return _channel; } private: + // Id of the logical core. const std::uint16_t _target_core_id;