Files
FEX-Emu--FEX/Source/Tests/LinuxSyscalls/x64/NotImplemented.cpp
T
Ryan Houdek 37983006f0 Moves FEXCore's SignalDelegator and SyscallHandler to the frontend
Sadly these things can't be split without breaking functionality so it
turns in to a bit of a mess.

SyscallHandler is very much something that is a Linux only construct and
shouldn't be in FEXCore itself. Lets the frontend register a
Syscallhandler with FEXCore. FEXCore itself is then aware of the current
syscall ABI and handles the ABI in an optimal fashion.
So it is not a 100% clean break otherwise we would lose performance.

The SignalDelegator then needs to move to the frontend since the
SyscallHandler requires it for signal based syscalls.
The CPU backend signal handling still needs to happen in FEXCore because
it is a very tight coupling with the CPU backend.
Once we need to support more Signal handling we can give the backends
cleaner support to select which specific OS handler to handle.
2020-12-13 22:38:04 -08:00

25 lines
997 B
C++

#include <FEXCore/Utils/LogManager.h>
#include "Tests/LinuxSyscalls/Syscalls.h"
#include "Tests/LinuxSyscalls/x64/Syscalls.h"
namespace FEX::HLE::x64 {
#define REGISTER_SYSCALL_NOT_IMPL_X64(name) REGISTER_SYSCALL_IMPL_X64(name, [](FEXCore::Core::InternalThreadState *Thread) -> uint64_t { \
LogMan::Msg::D("Using deprecated/removed syscall: " #name); \
return -ENOSYS; \
});
#define REGISTER_SYSCALL_NO_PERM_X64(name) REGISTER_SYSCALL_IMPL_X64(name, [](FEXCore::Core::InternalThreadState *Thread) -> uint64_t { \
return -EPERM; \
});
// these are removed/not implemented in the linux kernel we present
void RegisterNotImplemented() {
REGISTER_SYSCALL_NOT_IMPL_X64(tuxcall);
REGISTER_SYSCALL_NOT_IMPL_X64(security);
REGISTER_SYSCALL_NOT_IMPL_X64(set_thread_area);
REGISTER_SYSCALL_NOT_IMPL_X64(get_thread_area);
REGISTER_SYSCALL_NOT_IMPL_X64(epoll_ctl_old);
REGISTER_SYSCALL_NOT_IMPL_X64(epoll_wait_old);
REGISTER_SYSCALL_NO_PERM_X64(kexec_file_load);
}
}