Alexandre Julliard (@julliard) commented about server/thread.c:
- int max = THREAD_PRIORITY_HIGHEST;
 - int min = THREAD_PRIORITY_LOWEST;
 - if (priority_class == PROCESS_PRIOCLASS_REALTIME)
 - {
 max = THREAD_PRIORITY_REALTIME_HIGHEST;min = THREAD_PRIORITY_REALTIME_LOWEST;- }
 - if ((priority < min || priority > max) &&
 priority != THREAD_PRIORITY_IDLE &&priority != THREAD_PRIORITY_TIME_CRITICAL)- {
 errno = EINVAL;return -1;- }
 - if (thread->process->priority == priority_class &&
 
Internal functions should not use errno for error reporting.