mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-06-30 12:26:25 +02:00
armeilleure: Add Android signal handler
This commit is contained in:
parent
8a8db6244d
commit
b7d08e5050
3 changed files with 123 additions and 17 deletions
|
@ -88,10 +88,16 @@ namespace Ryujinx.Cpu.Signal
|
|||
|
||||
ref SignalHandlerConfig config = ref GetConfigRef();
|
||||
|
||||
if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS())
|
||||
if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || OperatingSystem.IsAndroid())
|
||||
{
|
||||
_signalHandlerPtr = MapCode(NativeSignalHandlerGenerator.GenerateUnixSignalHandler(_handlerConfig, rangeStructSize, pageSize));
|
||||
|
||||
if (OperatingSystem.IsAndroid())
|
||||
{
|
||||
config.StructAddressOffset = 16; // si_addr
|
||||
config.StructWriteOffset = 8; // si_code
|
||||
}
|
||||
|
||||
if (customSignalHandlerFactory != null)
|
||||
{
|
||||
_signalHandlerPtr = customSignalHandlerFactory(UnixSignalHandlerRegistration.GetSegfaultExceptionHandler().sa_handler, _signalHandlerPtr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue