diff --git a/src/mx/system/thread.h b/src/mx/system/thread.h deleted file mode 100644 index 7e1e8b2..0000000 --- a/src/mx/system/thread.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once -#include -#include -#include -#include - -namespace mx::system { -/** - * Encapsulates methods for thread access. - */ -/* Deprecated for Genode */ -/* Done: mx::system::thread : Replace POSIX-style thread pinning with Genode thread affinities */ - -class thread -{ -public: - /** - * Pins a thread to a given core. - * - * @param thread Thread to pin. - * @param core_id Core where the thread should be pinned. - * @return True, when pinning was successful. - */ - static bool pin(std::thread &thread, const std::uint16_t core_id) - { - cpu_set_t cpu_set; - CPU_ZERO(&cpu_set); - CPU_SET(core_id, &cpu_set); - - if (pthread_setaffinity_np(thread.native_handle(), sizeof(cpu_set_t), &cpu_set) != 0) - { - std::cerr << "Can not pin thread!" << std::endl; - return false; - } - - return true; - } -}; -} // namespace mx::system \ No newline at end of file