mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-10 20:00:22 +02:00
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.
26 lines
661 B
C++
26 lines
661 B
C++
#pragma once
|
|
#include <stdint.h>
|
|
|
|
namespace FEXCore::Core {
|
|
struct InternalThreadState;
|
|
struct CPUState;
|
|
}
|
|
|
|
namespace FEX::HLE::x32 {
|
|
// We must define this ourselves since it doesn't exist on non-x86 platforms
|
|
struct user_desc {
|
|
uint32_t entry_number;
|
|
uint32_t base_addr;
|
|
uint32_t limit;
|
|
uint32_t seg_32bit : 1;
|
|
uint32_t contents : 2;
|
|
uint32_t read_exec_only : 1;
|
|
uint32_t limit_in_pages : 1;
|
|
uint32_t seg_not_present : 1;
|
|
uint32_t useable : 1;
|
|
};
|
|
|
|
uint64_t SetThreadArea(FEXCore::Core::InternalThreadState *Thread, void *tls);
|
|
void AdjustRipForNewThread(FEXCore::Core::CPUState *Thread);
|
|
}
|