internal unsafe void SetInformationJob <T>(JobInformationClass infoClass, ref T buff) where T : unmanaged { fixed(void *buffP = &buff) { bool success = SetInformationJobObject(handle, infoClass, buffP, (uint)sizeof(T)); if (!success) { throw new Win32Exception(); } } }
internal unsafe T QueryInformationJob <T>(JobInformationClass infoClass, out T buff) where T : unmanaged { fixed(void *buffP = &buff) { bool success = QueryInformationJobObject(handle, infoClass, buffP, (uint)sizeof(T), out _); if (!success) { throw new Win32Exception(); } return(buff); } }
public static extern bool SetInformationJobObject(IntPtr hJob, JobInformationClass infoClass, in JobCpuRateControlInformation info, int size);
public unsafe static extern bool QueryInformationJobObject(IntPtr handle, JobInformationClass infoClass, out JobBasicAccoutingInformation info, int size, int *returned = null);
public unsafe static extern bool QueryInformationJobObject(IntPtr handle, JobInformationClass infoClass, out JobBasicProcessIdList processList, int size, int *returned = null);
public unsafe static extern bool QueryInformationJobObject(IntPtr handle, JobInformationClass infoClass, out JobExtendedLimitInformation info, int size, int *returned = null);
internal static extern unsafe bool SetInformationJobObject(SafeJobHandle handle, JobInformationClass informationClass, void *buffer, uint bufferLength);
internal static extern unsafe bool QueryInformationJobObject(SafeJobHandle handle, JobInformationClass informationClass, void *buffer, uint bufferLength, out uint returnLength);