// SPDX-License-Identifier: MIT #include #include #include #include #include namespace FEXCore::Threads { static fextl::unique_ptr CreateThread_Default(ThreadFunc Func, void* Arg, FEXCore::Threads::Flags Flags, const char* ThreadName) { ERROR_AND_DIE_FMT("Frontend didn't setup thread creation!"); } static void CleanupAfterFork_Default() { ERROR_AND_DIE_FMT("Frontend didn't setup thread creation!"); } static FEXCore::Threads::Pointers Ptrs = { .CreateThread = CreateThread_Default, .CleanupAfterFork = CleanupAfterFork_Default, }; fextl::unique_ptr FEXCore::Threads::Thread::Create(ThreadFunc Func, void* Arg, FEXCore::Threads::Flags Flags, const char* ThreadName) { return Ptrs.CreateThread(Func, Arg, Flags, ThreadName); } void FEXCore::Threads::Thread::CleanupAfterFork() { return Ptrs.CleanupAfterFork(); } void FEXCore::Threads::Thread::SetInternalPointers(const Pointers& _Ptrs) { Ptrs = _Ptrs; } } // namespace FEXCore::Threads