mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 10:56:58 +02:00
d475387171
macos: enable guest signal dispatch on the target thread The POSIX signal-dispatch path (pthread_kill based, added with the Linux port) was compiled out on macOS, leaving KernelRaiseException to run the guest handler on the calling thread. IL2CPP's garbage collector raises its stop-the-world signal at every managed thread and each handler parks its own thread until resume, so the collector parked itself and every Unity title froze on the first collection. Enable the same delivery path on macOS: - translate between the Darwin mcontext (uc_mcontext->__ss) and the guest ucontext in CreateSignalUcontextFromHost/ApplySignalUcontextToHost - use SIGUSR1 as the host dispatch signal (macOS has no realtime signals) - block the dispatch signal inside the host fault handler so a suspend request cannot preempt fault resolution between the protection fix and the retry Windows and Linux are unchanged.