Thread affinity

Don't set thread affinity in IsValid.
Remove SetThreadAffinityMask fallback as SetThreadGroupAffinity is available in W7 and up.
This commit is contained in:
PhyxionNL
2022-11-07 15:00:44 +01:00
parent 93fa695429
commit c4ec54e1cf
2 changed files with 18 additions and 33 deletions
+1 -5
View File
@@ -317,10 +317,6 @@ public class Kernel32
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool FreeLibrary(IntPtr module);
[DllImport(DllName, CallingConvention = CallingConvention.Winapi)]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
internal static extern UIntPtr SetThreadAffinityMask(IntPtr handle, UIntPtr mask);
[DllImport(DllName, CallingConvention = CallingConvention.Winapi)]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
internal static extern IntPtr GetCurrentThread();
@@ -1558,4 +1554,4 @@ public class Kernel32
FIRM = (byte)'F' << 24 | (byte)'I' << 16 | (byte)'R' << 8 | (byte)'M',
RSMB = (byte)'R' << 24 | (byte)'S' << 16 | (byte)'M' << 8 | (byte)'B'
}
}
}