/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/ |
H A D | 3-1.c | 11 * on the lock, they shall acquire the lock in priority order when the lock 12 * becomes available. For equal priority threads, write locks shall take precedence 17 * main has the highest priority, writer1 and reader has same priority, writer2 has lowest 18 * priority. 20 * 1. Main thread set its shcedule policy as "SCHED_FIFO", with highest priority 23 * 3. Create a writer1 thread, with schedule policy as "SCHED_FIFO", and priority 25 * 4. Create reader thread, with same priority as writer1. The reader should also block. 26 * 5. Create a writer2 thread, with priority sched_get_priority_min(). It should block 78 int priority; in fn_rd() local 82 set_priority(pthread_self(), TRD_POLICY, priority); fn_rd() local 113 int priority; fn_wr_1() local 117 set_priority(pthread_self(), TRD_POLICY, priority); fn_wr_1() local 150 int priority; fn_wr_2() local 154 set_priority(pthread_self(), TRD_POLICY, priority); fn_wr_2() local 192 int priority; main() local 196 set_priority(pthread_self(), TRD_POLICY, priority); main() local [all...] |
/third_party/vk-gl-cts/framework/delibs/depool/ |
H A D | dePoolHeap.c | 32 int priority; member 36 DE_INLINE HeapItem HeapItem_create (int priority, int value) in HeapItem_create() argument 39 h.priority = priority; in HeapItem_create() 46 if (a.priority < b.priority) in HeapItem_cmp() 48 if (a.priority > b.priority) in HeapItem_cmp() 70 DE_TEST_ASSERT(TestHeap_popMin(heap).priority == 0); in dePoolHeap_selfTest() 71 DE_TEST_ASSERT(TestHeap_popMin(heap).priority in dePoolHeap_selfTest() [all...] |
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/ |
H A D | 2-1.c | 13 * higher or equal priority are blocked on the lock; 16 * In this case, we test "higher priority writer block" 21 * 1. Main thread set its shcedule policy as "SCHED_FIFO", with highest priority 24 * 3. Create a writer thread, with schedule policy as "SCHED_FIFO", and priority 28 * priority sched_get_priority_min() 29 * 6. Reader thread read lock 'rwlock', should block, since there is a higher priority 77 int priority; in fn_rd() local 80 priority = (long)arg; in fn_rd() 81 set_priority(pthread_self(), TRD_POLICY, priority); in fn_rd() local 108 int priority; in fn_wr() local 112 set_priority(pthread_self(), TRD_POLICY, priority); fn_wr() local 145 int priority; main() local 149 set_priority(pthread_self(), TRD_POLICY, priority); main() local [all...] |
H A D | 2-2.c | 13 * higher or equal priority are blocked on the lock; 16 * In this case, we test "equal priority writer block" 21 * 1. Main thread set its shcedule policy as "SCHED_FIFO", with highest priority 24 * 3. Create a writer thread, with schedule policy as "SCHED_FIFO", and priority 28 * priority sched_get_priority_min()+1 29 * 6. Reader thread read lock 'rwlock', should block, since there is an equal priority 77 int priority; in fn_rd() local 80 priority = (long)arg; in fn_rd() 81 set_priority(pthread_self(), TRD_POLICY, priority); in fn_rd() local 108 int priority; in fn_wr() local 112 set_priority(pthread_self(), TRD_POLICY, priority); fn_wr() local 145 int priority; main() local 149 set_priority(pthread_self(), TRD_POLICY, priority); main() local [all...] |
H A D | 2-3.c | 13 * higher or equal priority are blocked on the lock; 16 * In this case, reader has higher priority than the writer 21 * 1. Main thread set its shcedule policy as "SCHED_FIFO", with highest priority 24 * 3. Create a writer thread, with schedule policy as "SCHED_FIFO", and priority 28 * priority sched_get_priority_min()+1 29 * 6. Reader thread read lock 'rwlock', shouldn't block, since it has a higher priority 77 int priority; in fn_rd() local 80 priority = (int)(long)arg; in fn_rd() 81 set_priority(pthread_self(), TRD_POLICY, priority); in fn_rd() local 108 int priority; in fn_wr() local 112 set_priority(pthread_self(), TRD_POLICY, priority); fn_wr() local 146 int priority; main() local 150 set_priority(pthread_self(), TRD_POLICY, priority); main() local [all...] |
/third_party/libuv/test/ |
H A D | test-process-priority.c | 27 int priority; in TEST_IMPL() local 45 set this specific priority. */ in TEST_IMPL() 50 ASSERT_OK(uv_os_getpriority(0, &priority)); in TEST_IMPL() 52 /* Verify that the priority values match on Unix, and are range mapped 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_NORMA in TEST_IMPL() [all...] |
H A D | test-thread-priority.c | 48 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, in TEST_IMPL() [all...] |
/third_party/skia/third_party/externals/dng_sdk/source/ |
H A D | dng_abort_sniffer.cpp | 41 void Increment (dng_priority priority); 43 void Decrement (dng_priority priority); 45 void Wait (dng_priority priority); 94 void dng_priority_manager::Increment (dng_priority priority) in Increment() argument 99 fCounter [priority] += 1; in Increment() 105 void dng_priority_manager::Decrement (dng_priority priority) in Decrement() argument 112 fCounter [priority] -= 1; in Decrement() 127 void dng_priority_manager::Wait (dng_priority priority) in Wait() argument 130 if (priority < dng_priority_maximum) in Wait() 135 while (priority < MinPriorit in Wait() 156 dng_set_minimum_priority(dng_priority priority) dng_set_minimum_priority() argument [all...] |
/third_party/node/test/parallel/ |
H A D | test-os-process-priority.js | 3 // IBMi process priority is different. 5 common.skip('IBMi has a different process priority'); 16 } = os.constants.priority; 18 // Validate priority constants. 58 // Test priority type validation. 59 [null, true, false, 'foo', {}, [], /x/].forEach((priority) => { 61 os.setPriority(0, priority); 64 message: /The "priority" argument must be of type number\./ 68 // Test priority range validation. 77 ].forEach((priority) [all...] |
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getschedparam/ |
H A D | 1-1.c | 31 static int verify_param(pthread_attr_t * attr, int priority) in verify_param() argument 41 if (priority != param.sched_priority) { in verify_param() 53 int priority; in main() local 66 priority = sched_get_priority_max(FIFOPOLICY); in main() 67 if (priority == -1) { in main() 71 param.sched_priority = priority; in main() 77 verify_param(&attr, priority); in main() 84 priority = sched_get_priority_max(RRPOLICY); in main() 85 if (priority == -1) { in main() 89 param.sched_priority = priority; in main() [all...] |
/third_party/ltp/testcases/kernel/device-drivers/v4l/user_space/ |
H A D | test_VIDIOC_PRIORITY.c | 33 int valid_priority(enum v4l2_priority priority) in valid_priority() argument 39 switch (priority) { in valid_priority() 52 static void do_set_priority(enum v4l2_priority priority) in do_set_priority() argument 58 dprintf("\t%s:%u: set priority to %i\n", __FILE__, __LINE__, priority); in do_set_priority() 59 ret_set = ioctl(get_video_fd(), VIDIOC_S_PRIORITY, &priority); in do_set_priority() 74 CU_ASSERT_EQUAL(new_priority, priority); in do_set_priority() 80 enum v4l2_priority priority) in do_set_invalid_priority() 86 dprintf("\t%s:%u: try to set priority to %i\n", __FILE__, __LINE__, in do_set_invalid_priority() 87 priority); in do_set_invalid_priority() 79 do_set_invalid_priority(enum v4l2_priority orig_priority, enum v4l2_priority priority) do_set_invalid_priority() argument 138 enum v4l2_priority priority; test_VIDIOC_G_PRIORITY_NULL() local 239 enum v4l2_priority priority; test_VIDIOC_S_PRIORITY_NULL() local [all...] |
/third_party/ltp/testcases/realtime/stress/pi-tests/ |
H A D | testpi-3.c | 79 int priority; 115 printf("Thread started %d on CPU %ld\n", pthr->priority, in func_nonrt() 118 printf("Thread running %d\n", pthr->priority); in func_nonrt() 124 pthr->priority, policy, schedp.sched_priority); in func_nonrt() 131 "pri %d\n", tid, pthr->priority, i, in func_nonrt() 164 printf("Thread started %d on CPU %ld\n", pthr->priority, in func_rt() 170 printf("Thread running %d\n", pthr->priority); in func_rt() 174 pthr->priority, policy, schedp.sched_priority); in func_rt() 178 * of this is to show that high priority threads make more in func_rt() 179 * progress than lower priority thread in func_rt() [all...] |
/third_party/node/deps/v8/src/libplatform/ |
H A D | default-job.cc | 33 TaskPriority priority, in DefaultJobState() 37 priority_(priority), in DefaultJobState() 46 TaskPriority priority; in NotifyConcurrencyIncrease() local 55 priority = priority_; in NotifyConcurrencyIncrease() 59 CallOnWorkerThread(priority, std::make_unique<DefaultJobWorker>( in NotifyConcurrencyIncrease() 150 TaskPriority priority; in DidRunTask() local 166 priority = priority_; in DidRunTask() 174 CallOnWorkerThread(priority, std::make_unique<DefaultJobWorker>( in DidRunTask() 199 void DefaultJobState::CallOnWorkerThread(TaskPriority priority, in CallOnWorkerThread() argument 201 switch (priority) { in CallOnWorkerThread() 31 DefaultJobState(Platform* platform, std::unique_ptr<JobTask> job_task, TaskPriority priority, size_t num_worker_threads) DefaultJobState() argument 211 UpdatePriority(TaskPriority priority) UpdatePriority() argument 239 UpdatePriority(TaskPriority priority) UpdatePriority() argument [all...] |
/third_party/musl/porting/liteos_a/user/src/misc/ |
H A D | syslog.c | 88 static void _vsyslog(int priority, const char *message, va_list ap) in _vsyslog() argument 102 if (!(priority & LOG_FACMASK)) priority |= log_facility; in _vsyslog() 110 priority, timebuf, &hlen, log_ident, "["+!pid, pid, "]"+!pid); in _vsyslog() 131 static void __vsyslog(int priority, const char *message, va_list ap) in __vsyslog() argument 134 if (!(log_mask & LOG_MASK(priority&7)) || (priority&~0x3ff)) return; in __vsyslog() 137 _vsyslog(priority, message, ap); in __vsyslog() 142 void syslog(int priority, const char *message, ...) in syslog() argument 147 __vsyslog(priority, messag in syslog() [all...] |
/third_party/musl/src/misc/ |
H A D | syslog.c | 89 static void _vsyslog(int priority, const char *message, va_list ap) in _vsyslog() argument 103 if (!(priority & LOG_FACMASK)) priority |= log_facility; in _vsyslog() 111 priority, timebuf, &hlen, log_ident, "["+!pid, pid, "]"+!pid); in _vsyslog() 132 static void __vsyslog(int priority, const char *message, va_list ap) in __vsyslog() argument 135 if (!(log_mask & LOG_MASK(priority&7)) || (priority&~0x3ff)) return; in __vsyslog() 138 _vsyslog(priority, message, ap); in __vsyslog() 143 void syslog(int priority, const char *message, ...) in syslog() argument 148 __vsyslog(priority, messag in syslog() [all...] |
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_post/ |
H A D | 8-1.c | 17 * priority waiting thread shall be unblocked, and if there is 18 * more than one highest priority thread blocked waiting for the semaphore, 19 * then the highest priority thread that has been waiting the 26 * 1. Parent locks a semaphore, it has highest priority P0. 27 * 2. It forks 2 child processes 1, 2, as for priority P1, P2, P0 > P2 > P1 30 * 4. Parent forks another child 3, with priority P3, P3 = P2, it locks 54 static int set_my_prio(int priority) in set_my_prio() argument 57 sp.sched_priority = priority; in set_my_prio() 79 static int child_fn(int priority, int id) in child_fn() argument 83 if (set_my_prio(priority)) in child_fn() 121 int priority; main() local [all...] |
/third_party/node/deps/npm/node_modules/negotiator/lib/ |
H A D | encoding.js | 94 * Get the priority of an encoding. 99 var priority = {o: -1, q: 0, s: 0}; 104 if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { 105 priority = spec; 109 return priority; 154 return priorities.filter(isQuality).sort(compareSpecs).map(function getEncoding(priority) { 155 return provided[priorities.indexOf(priority)];
|
H A D | language.js | 82 * Get the priority of a language. 87 var priority = {o: -1, q: 0, s: 0}; 92 if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { 93 priority = spec; 97 return priority; 149 return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) { 150 return provided[priorities.indexOf(priority)];
|
H A D | charset.js | 78 * Get the priority of a charset. 83 var priority = {o: -1, q: 0, s: 0}; 88 if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { 89 priority = spec; 93 return priority; 139 return priorities.filter(isQuality).sort(compareSpecs).map(function getCharset(priority) { 140 return provided[priorities.indexOf(priority)];
|
/third_party/ltp/testcases/realtime/func/pi-tests/ |
H A D | testpi-2.c | 23 * This testcase verifies if the low priority SCHED_RR thread can preempt 24 * the high priority SCHED_RR thread multiple times via priority 88 printf("Thread %d started running with priority %d\n", tid, in func_lowrt() 89 pthr->priority); in func_lowrt() 92 tid, pthr->policy, pthr->priority); in func_lowrt() 96 /* Wait for the high priority noise thread to start and signal us */ in func_lowrt() 104 tid, i, pthr->policy, pthr->priority); in func_lowrt() 118 printf("Thread %d started running with prio %d\n", tid, pthr->priority); in func_rt() 122 tid, pthr->policy, pthr->priority); in func_rt() [all...] |
H A D | testpi-4.c | 24 * the SCHED_RR thread via priority inheritance. 87 printf("Thread %d started running with priority %d\n", tid, in func_nonrt() 88 pthr->priority); in func_nonrt() 91 tid, pthr->policy, pthr->priority); in func_nonrt() 96 /* Wait for the high priority noise thread to start and signal us */ in func_nonrt() 104 tid, i, pthr->policy, pthr->priority); in func_nonrt() 118 printf("Thread %d started running with prio %d\n", tid, pthr->priority); in func_rt() 122 tid, pthr->policy, pthr->priority); in func_rt() 126 * of this is to show that high priority threads make more in func_rt() 127 * progress than lower priority thread in func_rt() [all...] |
H A D | testpi-1.c | 23 * This testcase verifies if the low priority SCHED_OTHER thread can preempt 24 * the high priority SCHED_RR thread via priority inheritance. 86 printf("Thread %d started running with priority %d\n", tid, in func_nonrt() 87 pthr->priority); in func_nonrt() 90 tid, pthr->policy, pthr->priority); in func_nonrt() 94 /* Wait for the high priority noise thread to start and signal us */ in func_nonrt() 102 tid, i, pthr->policy, pthr->priority); in func_nonrt() 116 printf("Thread %d started running with prio %d\n", tid, pthr->priority); in func_rt() 120 tid, pthr->policy, pthr->priority); in func_rt() [all...] |
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedprio/ |
H A D | 1-1.c | 11 * policy and param, respectively. The priority value returned from 16 * its priority as a result of any priority inheritance or ceiling functions. 29 int policy, priority, policy_1; in a_thread_func() local 33 priority = sched_get_priority_min(policy); in a_thread_func() 34 sparam.sched_priority = priority; in a_thread_func() 46 printf("policy: %d, priority: %d\n", policy_1, sparam.sched_priority); in a_thread_func() 47 if (policy_1 != policy || sparam.sched_priority != priority) { in a_thread_func() 52 rc = pthread_setschedprio(pthread_self(), priority + 1); in a_thread_func() 63 printf("policy: %d, priority in a_thread_func() [all...] |
/third_party/ltp/testcases/kernel/sched/sched_stress/ |
H A D | sched_tc1.c | 26 | Algorithm: o Set process priority | 33 | Usage: sched_tc1 [-p priority] [-v] [-d] | 56 * DEFAULT_PRIORITY_TYPE: default priority 60 #define USAGE "Usage: %s [-p priority] [-v] [-d] \n" \ 61 " -p priority priority (default variable) \n" \ 85 * priority: process type (fixed priority, variable priority) 90 char *priority variable [all...] |
H A D | sched_tc0.c | 27 | Algorithm: o Set process priority | 33 | Usage: sched_tc0 [-t sec] [-p priority] [-v] [-d] | 55 * DEFAULT_PRIORITY_TYPE: default priority 62 #define USAGE "Usage: %s [-p priority] [-t sec] [-v] [-d] \n" \ 64 " -p priority priority (default variable) \n" \ 87 * priority: process type (fixed priority, variable priority) 92 char *priority variable [all...] |