| 34 | #endif |
| 35 | |
| 36 | bool SetHighestThreadPriority() { |
| 37 | #ifdef _win_ |
| 38 | return SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST); |
| 39 | #else |
| 40 | struct sched_param sch; |
| 41 | memset(&sch, 0, sizeof(sch)); |
| 42 | sch.sched_priority = 31; |
| 43 | return pthread_setschedparam(pthread_self(), SCHED_RR, &sch) == 0; |
| 44 | #endif |
| 45 | } |
| 46 | |
| 47 | bool SetLowestThreadPriority() { |
| 48 | #ifdef _win_ |
no outgoing calls
no test coverage detected