mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-06-28 11:26:24 +02:00
Add NCE code
This commit is contained in:
parent
a1e34041fa
commit
0970972f0d
40 changed files with 2702 additions and 40 deletions
20
src/Ryujinx.Cpu/Nce/NceThreadPalAndroid.cs
Normal file
20
src/Ryujinx.Cpu/Nce/NceThreadPalAndroid.cs
Normal 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}.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue