// SPDX-License-Identifier: MIT #pragma once #include #include #include #include namespace FEX::DummyHandlers { class DummySyscallHandler : public FEXCore::HLE::SyscallHandler, public FEXCore::Allocator::FEXAllocOperators { public: void HandleSyscall(FEXCore::Core::CpuStateFrame* Frame) override { // Don't do anything } // These are no-ops implementations of the SyscallHandler API std::optional LookupExecutableFileSection(FEXCore::Core::InternalThreadState*, uint64_t) override { return std::nullopt; } FEXCore::HLE::ExecutableRangeInfo QueryGuestExecutableRange(FEXCore::Core::InternalThreadState* Thread, uint64_t Address) override { return {0, UINT64_MAX, true}; } }; class DummySignalDelegator final : public FEXCore::SignalDelegator, public FEXCore::Allocator::FEXAllocOperators { public: FEXCore::Core::InternalThreadState* GetBackingTLSThread() { return GetTLSThread(); } protected: void RegisterTLSState(FEXCore::Core::InternalThreadState* Thread); void UninstallTLSState(FEXCore::Core::InternalThreadState* Thread); private: FEXCore::Core::InternalThreadState* GetTLSThread(); }; fextl::unique_ptr CreateSyscallHandler(); fextl::unique_ptr CreateSignalDelegator(); } // namespace FEX::DummyHandlers