internal static bool SetCurrentThreadHighPriority() { IntPtr thread = pthread_self(); sched_param sched = new sched_param(); sched.sched_priority = sched_get_priority_min(SCHED_FIFO); return(pthread_setschedparam(thread, SCHED_FIFO, ref sched) == 0); }
private static extern int pthread_setschedparam(IntPtr thread, int policy, ref sched_param param);