Home
last modified time | relevance | path

Searched refs:priority (Results 1 – 13 of 13) sorted by relevance

/libuv/test/
H A Dtest-thread-priority.c48 int priority; in TEST_IMPL() local
62 ASSERT_OK(uv_thread_getpriority(task_id, &priority)); in TEST_IMPL()
65 ASSERT_EQ(priority, THREAD_PRIORITY_NORMAL); in TEST_IMPL()
75 ASSERT(priority >= min && priority <= max); in TEST_IMPL()
79 ASSERT_OK(uv_thread_getpriority(task_id, &priority)); in TEST_IMPL()
82 ASSERT_EQ(priority, THREAD_PRIORITY_LOWEST); in TEST_IMPL()
84 ASSERT_EQ(priority, min); in TEST_IMPL()
91 ASSERT_OK(uv_thread_getpriority(pthread_self(), &priority)); in TEST_IMPL()
92 ASSERT_EQ(priority, 0); in TEST_IMPL()
94 ASSERT_OK(uv_thread_getpriority(pthread_self(), &priority)); in TEST_IMPL()
[all …]
H A Dtest-process-priority.c27 int priority; in TEST_IMPL() local
50 ASSERT_OK(uv_os_getpriority(0, &priority)); in TEST_IMPL()
55 ASSERT_EQ(priority, i); in TEST_IMPL()
60 ASSERT(priority == UV_PRIORITY_HIGHEST || priority == UV_PRIORITY_HIGH); in TEST_IMPL()
62 ASSERT_EQ(priority, UV_PRIORITY_HIGH); in TEST_IMPL()
64 ASSERT_EQ(priority, UV_PRIORITY_ABOVE_NORMAL); in TEST_IMPL()
66 ASSERT_EQ(priority, UV_PRIORITY_NORMAL); in TEST_IMPL()
68 ASSERT_EQ(priority, UV_PRIORITY_BELOW_NORMAL); in TEST_IMPL()
70 ASSERT_EQ(priority, UV_PRIORITY_LOW); in TEST_IMPL()
75 ASSERT_EQ(priority, r); in TEST_IMPL()
/libuv/src/win/
H A Dutil.c1397 if (priority == NULL) in uv_os_getpriority()
1412 *priority = UV_PRIORITY_HIGHEST; in uv_os_getpriority()
1414 *priority = UV_PRIORITY_HIGH; in uv_os_getpriority()
1418 *priority = UV_PRIORITY_NORMAL; in uv_os_getpriority()
1422 *priority = UV_PRIORITY_LOW; in uv_os_getpriority()
1438 if (priority < UV_PRIORITY_HIGHEST || priority > UV_PRIORITY_LOW) in uv_os_setpriority()
1440 else if (priority < UV_PRIORITY_HIGH) in uv_os_setpriority()
1448 else if (priority < UV_PRIORITY_LOW) in uv_os_setpriority()
1468 if (priority == NULL) in uv_thread_getpriority()
1475 *priority = r; in uv_thread_getpriority()
[all …]
/libuv/src/unix/
H A Dcore.c1537 if (priority == NULL) in uv_os_getpriority()
1546 *priority = r; in uv_os_getpriority()
1552 if (priority < UV_PRIORITY_HIGHEST || priority > UV_PRIORITY_LOW) in uv_os_setpriority()
1575 if (priority == NULL) in uv_thread_getpriority()
1588 *priority = r; in uv_thread_getpriority()
1593 *priority = param.sched_priority; in uv_thread_getpriority()
1602 if (priority < UV_THREAD_PRIORITY_LOWEST || priority > UV_THREAD_PRIORITY_HIGHEST) in set_nice_for_calling_thread()
1606 nice = 0 - priority * 2; in set_nice_for_calling_thread()
1627 if (priority < UV_THREAD_PRIORITY_LOWEST || priority > UV_THREAD_PRIORITY_HIGHEST) in uv_thread_setpriority()
1640 return set_nice_for_calling_thread(priority); in uv_thread_setpriority()
[all …]
/libuv/docs/src/
H A Dthreading.rst135 .. c:function:: int uv_thread_setpriority(uv_thread_t tid, int priority)
138 Sets the scheduling priority of the thread specified by tid. It requires elevated
140 The priority can be set to the following constants. UV_THREAD_PRIORITY_HIGHEST,
143 .. c:function:: int uv_thread_getpriority(uv_thread_t tid, int* priority)
146 Retrieves the scheduling priority of the thread specified by tid. The value in the
147 output parameter priority is platform dependent.
148 For Linux, when schedule policy is SCHED_OTHER (default), priority is 0.
H A Dmisc.rst783 .. c:function:: int uv_os_getpriority(uv_pid_t pid, int* priority)
785 Retrieves the scheduling priority of the process specified by `pid`. The
786 returned value of `priority` is between -20 (high priority) and 19 (low
787 priority).
795 .. c:function:: int uv_os_setpriority(uv_pid_t pid, int priority)
797 Sets the scheduling priority of the process specified by `pid`. The
798 `priority` value range is between -20 (high priority) and 19 (low priority).
805 argument is mapped to a Windows priority class. When retrieving the
806 process priority, the result will equal one of the `UV_PRIORITY`
807 constants, and not necessarily the exact value of `priority`.
[all …]
/libuv/
H A DSUPPORTED_PLATFORMS.md25 without being a top priority.
H A DMakefile.am241 test/test-process-priority.c \
297 test/test-thread-priority.c \
H A DCMakeLists.txt608 test/test-process-priority.c
664 test/test-thread-priority.c
H A DChangeLog15 * unix,win: utility for setting priority for thread (Hao Hu)
1406 * ibmi: set the highest process priority to -10 (Xu Meng)
2330 * unix,win: add uv_os_{get,set}priority() (cjihrig)
/libuv/include/
H A Duv.h1302 UV_EXTERN int uv_os_getpriority(uv_pid_t pid, int* priority);
1303 UV_EXTERN int uv_os_setpriority(uv_pid_t pid, int priority);
1313 UV_EXTERN int uv_thread_getpriority(uv_thread_t tid, int* priority);
1314 UV_EXTERN int uv_thread_setpriority(uv_thread_t tid, int priority);
/libuv/docs/src/guide/
H A Dthreads.rst134 multiple writers, schedulers will usually give them higher priority, so if you
H A Dutilities.rst103 callback can be used to perform some very low priority activity. For example,

Completed in 52 milliseconds