From 6b983dede7e32bbb1bcd3e5a21bffdc13334b052 Mon Sep 17 00:00:00 2001 From: Michael Mueller Date: Tue, 13 Feb 2024 19:45:31 +0100 Subject: [PATCH] Added entrypoint for pthread_create to Worker. --- src/mx/tasking/worker.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mx/tasking/worker.h b/src/mx/tasking/worker.h index 3ed5d3b..e504320 100644 --- a/src/mx/tasking/worker.h +++ b/src/mx/tasking/worker.h @@ -32,6 +32,16 @@ public: */ void execute(); + static void *entry(void *args) { + Worker *worker = static_cast(args); + if (worker == nullptr) { + Genode::error("No worker found."); + return nullptr; + } + worker->execute(); + return nullptr; + } + /** * @return Id of the logical core this worker runs on. */