Lines Matching refs:priority
1544 int uv_os_getpriority(uv_pid_t pid, int* priority) { in uv_os_getpriority() argument
1547 if (priority == NULL) in uv_os_getpriority()
1556 *priority = r; in uv_os_getpriority()
1561 int uv_os_setpriority(uv_pid_t pid, int priority) { in uv_os_setpriority() argument
1562 if (priority < UV_PRIORITY_HIGHEST || priority > UV_PRIORITY_LOW) in uv_os_setpriority()
1565 if (setpriority(PRIO_PROCESS, (int) pid, priority) != 0) in uv_os_setpriority()
1577 int uv_thread_getpriority(uv_thread_t tid, int* priority) { in uv_thread_getpriority() argument
1585 if (priority == NULL) in uv_thread_getpriority()
1598 *priority = r; in uv_thread_getpriority()
1603 *priority = param.sched_priority; in uv_thread_getpriority()
1608 static int set_nice_for_calling_thread(int priority) { in set_nice_for_calling_thread() argument
1612 if (priority < UV_THREAD_PRIORITY_LOWEST || priority > UV_THREAD_PRIORITY_HIGHEST) in set_nice_for_calling_thread()
1616 nice = 0 - priority * 2; in set_nice_for_calling_thread()
1628 int uv_thread_setpriority(uv_thread_t tid, int priority) { in uv_thread_setpriority() argument
1638 if (priority < UV_THREAD_PRIORITY_LOWEST || priority > UV_THREAD_PRIORITY_HIGHEST) in uv_thread_setpriority()
1651 return set_nice_for_calling_thread(priority); in uv_thread_setpriority()
1667 switch (priority) { in uv_thread_setpriority()