Add NCE code

This commit is contained in:
gdk 2023-07-03 19:28:05 -03:00 committed by Emmanuel Hansen
parent a1e34041fa
commit 0970972f0d
40 changed files with 2702 additions and 40 deletions

View file

@ -0,0 +1,20 @@
using System;
using System.Runtime.InteropServices;
namespace Ryujinx.Cpu.Nce
{
static class NceThreadPalAndroid
{
[DllImport("libc", SetLastError = true)]
private static extern int pthread_kill(IntPtr thread, int sig);
public static void SuspendThread(IntPtr handle)
{
int result = pthread_kill(handle, NceThreadPal.UnixSuspendSignal);
if (result != 0)
{
throw new Exception($"Thread kill returned error 0x{result:X}.");
}
}
}
}