public static int GetAvailableCpusForProcess()
        {
            var result = SchedulerInterop.GetAvailableCpusForProcess();

            result.ThrowOnError();
            return(result.IntValue);
        }
 public static PosixResult TryClearCurrentThreadAffinity()
 {
     return(SchedulerInterop.ClearCurrentThreadAffinity());
 }
 public static PosixResult TrySetCurrentThreadAffinity(int cpuId)
 {
     return(SchedulerInterop.SetCurrentThreadAffinity(cpuId));
 }