/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/ |
H A D | 4-1.c | 66 pthread_t thread[THREAD_NUM]; in main() local 78 if (pthread_create(&thread[i], NULL, thr_func, NULL) != 0) { in main() 79 fprintf(stderr, "Fail to create thread[%d]\n", i); in main() 99 fprintf(stderr, "[Main thread] broadcast the condition\n"); in main() 113 fprintf(stderr, "[Main thread] pthread_cond_broadcast() returned 0\n"); in main() 116 fprintf(stderr, "[Main thread] Not all waiters were wakened\n"); in main() 118 pthread_cancel(thread[i]); in main() 122 fprintf(stderr, "[Main thread] all waiters were wakened\n"); in main() 126 if (pthread_join(thread[i], NULL) != 0) { in main() 127 fprintf(stderr, "Fail to join thread[ in main() [all...] |
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/ |
H A D | 2-1.c | 9 * When each thread unblocked as a result of pthread_cond_signal() 10 * returns from its call to pthread_cond_wait(), the thread shall 29 static pthread_t thread[THREAD_NUM]; variable 40 pthread_cancel(thread[i]); in alarm_handler() 123 if (pthread_create(&thread[i], NULL, thr_func, NULL) != 0) { in main() 124 fprintf(stderr, "Fail to create thread[%d]\n", i); in main() 141 fprintf(stderr, "[Main thread] signals a condition\n"); in main() 151 if (pthread_join(thread[i], NULL) != 0) { in main() 152 fprintf(stderr, "Fail to join thread[%d]\n", i); in main()
|
H A D | 4-1.c | 28 static pthread_t thread[THREAD_NUM]; variable 39 pthread_cancel(thread[i]); in alarm_handler() 92 if (pthread_create(&thread[i], NULL, thr_func, NULL) != 0) { in main() 93 fprintf(stderr, "Fail to create thread[%d]\n", i); in main() 108 fprintf(stderr, "[Main thread] signals a condition\n"); in main() 122 if (pthread_join(thread[i], NULL) != 0) { in main() 123 fprintf(stderr, "Fail to join thread[%d]\n", i); in main()
|
/third_party/musl/libc-test/src/functionalext/supplement/thread/thread_gtest/ |
H A D | pthread_key_test.cpp | 4 #include <thread> 31 * @tc.desc: Set the key for the thread until the key namespace is used up and counted, 75 pthread_t thread; in HWTEST_F() local 76 pthread_create(&thread, &pthreadAttr, dirtyKeyThread, &pthreadKey); in HWTEST_F() 78 pthread_join(thread, &attrStackResult); in HWTEST_F()
|
H A D | thread_callonce_test.cpp | 2 #include <thread> 20 * @tc.desc: Call the function twice in a single thread, ensuring that the function is only called once 32 std::thread([&onceCall] { call_once(&onceCall, CallThrdSleep); }).join(); in HWTEST_F() 40 * @tc.desc: Call the function twice in a single thread, ensuring that the function is only called once 52 std::thread([&onceCall] { pthread_once(&onceCall, CallThrdSleep); }).join(); in HWTEST_F()
|
/third_party/skia/third_party/externals/abseil-cpp/absl/synchronization/ |
H A D | notification_test.cc | 17 #include <thread> // NOLINT(build/c++11) 26 // A thread-safe class that holds a counter. 52 // Runs the |i|'th worker thread for the tests in BasicTests(). Increments the 97 std::vector<std::thread> workers; in BasicTests() 99 workers.push_back(std::thread(&RunWorker, i, &ready_counter, notification, in BasicTests() 119 for (std::thread& worker : workers) { in BasicTests()
|
/third_party/libuv/test/ |
H A D | test-eintr-handling.c | 66 uv_thread_t thread; in TEST_IMPL() local 77 ASSERT_OK(uv_thread_create(&thread, thread_main, &ctx)); in TEST_IMPL() 90 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
|
H A D | test-embed.c | 49 uv_thread_t thread; in TEST_IMPL() local 55 ASSERT_OK(uv_thread_create(&thread, thread_main, NULL)); in TEST_IMPL() 74 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
|
H A D | test-async.c | 27 static uv_thread_t thread; variable 62 * to kick in. Afterwards, the thread busy-loops, starving the main thread. in thread_cb() 102 r = uv_thread_create(&thread, thread_cb, NULL); in prepare_cb() 130 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
|
/third_party/mesa3d/src/intel/vulkan/tests/ |
H A D | state_pool_test_helper.h | 29 pthread_t thread; member 66 pthread_create(&jobs[i].thread, NULL, alloc_states, &jobs[i]); in run_state_pool_test() 70 pthread_join(jobs[i].thread, NULL); in run_state_pool_test()
|
H A D | state_pool_no_free.c | 34 pthread_t thread; member 73 pthread_create(&jobs[i].thread, NULL, alloc_states, &jobs[i]); in run_test() 77 pthread_join(jobs[i].thread, NULL); in run_test() 79 /* A list of indices, one per thread */ in run_test() 85 /* First, we find which thread has the highest next element */ in run_test()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/ |
H A D | 1-1.c | 16 * 2. Create a child thread, the thread lock 'rwlock' for reading, shall not block. 59 pthread_t thread; in main() local 76 printf("main: create thread\n"); in main() 77 if (pthread_create(&thread, NULL, fn_rd, NULL) != 0) { in main() 78 printf("main: failed to create thread\n"); in main() 84 /* We expect the thread not to block */ in main() 91 printf("Test FAILED: thread blocked on read lock\n"); in main() 94 printf("main: Unexpected thread state\n"); in main() 98 if (pthread_join(thread, NUL in main() [all...] |
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/ |
H A D | 1-1.c | 12 * 3. Create a thread with this object 39 pthread_t thread; in main() local 71 rc = pthread_create(&thread, &attr, thread_func, NULL); in main() 75 "Permission Denied when creating thread with policy %d\n", in main() 84 pthread_join(thread, &status); in main()
|
H A D | 1-2.c | 12 * 3. Create a thread with this object 40 pthread_t thread; in main() local 73 rc = pthread_create(&thread, &attr, thread_func, NULL); in main() 77 "Permission Denied when creating thread with policy %d\n", in main() 86 pthread_join(thread, &status); in main()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/ |
H A D | 7-1.c | 23 * -> create a thread which blocks on the semaphore 102 pthread_t thread; in main() local 120 /* Create the child thread */ in main() 121 ret = pthread_create(&thread, NULL, threaded, sem); in main() 124 UNRESOLVED(ret, "Failed to create the thread"); in main() 127 /* Let some time for the thread to block */ in main() 144 /* Join the thread */ in main() 145 ret = pthread_join(thread, NULL); in main() 148 UNRESOLVED(ret, "Failed to join the thread"); in main()
|
/third_party/musl/libc-test/src/functionalext/supplement/thread/ |
H A D | pthread_spin_lock.c | 61 pthread_t thread; in pthread_spin_lock_0200() local 67 ret = pthread_create(&thread, NULL, (void *)thread1, NULL); in pthread_spin_lock_0200() 79 pthread_join(thread, &rev); in pthread_spin_lock_0200()
|
/third_party/rust/crates/once_cell/examples/ |
H A D | bench_acquire.rs | 17 (0..N_THREADS).map(|i| std::thread::spawn(move || thread_main(i))).collect::<Vec<_>>(); in main() 18 for thread in threads { in main() 19 thread.join().unwrap(); in main()
|
/third_party/rust/crates/rustix/src/thread/ |
H A D | clock.rs | 42 backend::thread::syscalls::clock_nanosleep_relative(id, request) in clock_nanosleep_relative() 70 backend::thread::syscalls::clock_nanosleep_absolute(id, request) in clock_nanosleep_absolute() 85 backend::thread::syscalls::nanosleep(request) in nanosleep()
|
/third_party/elfutils/libdwfl/ |
H A D | linux-pid-attach.c | 291 /* Just checks that the thread id exists. */ 311 Dwfl_Thread *thread = (Dwfl_Thread *) arg; in pid_thread_state_registers_cb() local 316 INTUSE(dwfl_thread_state_register_pc) (thread, *regs); in pid_thread_state_registers_cb() 320 return INTUSE(dwfl_thread_state_registers) (thread, firstreg, nregs, regs); in pid_thread_state_registers_cb() 324 pid_set_initial_registers (Dwfl_Thread *thread, void *thread_arg) in pid_set_initial_registers() argument 328 pid_t tid = INTUSE(dwfl_thread_tid) (thread); in pid_set_initial_registers() 333 Dwfl_Process *process = thread->process; in pid_set_initial_registers() 336 pid_thread_state_registers_cb, thread); in pid_set_initial_registers() 364 pid_thread_detach (Dwfl_Thread *thread, void *thread_arg) in pid_thread_detach() argument 367 pid_t tid = INTUSE(dwfl_thread_tid) (thread); in pid_thread_detach() [all...] |
/third_party/python/Lib/ |
H A D | socketserver.py | 23 - threading (each request is handled by a new thread) 221 another thread. 249 serve_forever() is running in another thread, or it will 270 # new thread to finish the request 643 def append(self, thread): 645 if thread.daemon: 647 super().append(thread) 654 for thread in self.pop_all(): 655 thread.join() 658 self[:] = (thread fo [all...] |
H A D | threading.py | 61 The func will be passed to sys.setprofile() for each thread, before its 75 The func will be passed to sys.settrace() for each thread, before its run() 93 A reentrant lock must be released by the thread that acquired it. Once a 94 thread has acquired a reentrant lock, the same thread may acquire it again 95 without blocking; the thread must release it once for each time it has 106 A reentrant lock must be released by the thread that acquired it. Once a 107 thread has acquired a reentrant lock, the same thread may acquire it 108 again without blocking; the thread mus [all...] |
/third_party/skia/third_party/externals/swiftshader/third_party/marl/src/ |
H A D | scheduler_test.cpp | 137 marl::containers::vector<std::thread, 32> threads; in TEST_P() 139 threads.emplace_back(std::thread([=] { in TEST_P() 154 for (auto& thread : threads) { in TEST_P() 155 thread.join(); in TEST_P() 168 marl::containers::unordered_set<std::thread::id> threads(allocator); in TEST_F() 185 // without first binding to the scheduling thread. 202 // Despite the main thread never binding the scheduler, the scheduler in TEST_F() 210 // As the scheduler has not been bound to the main thread, the wait() call in TEST_F() 216 // without first binding to the scheduling thread.
|
/third_party/skia/tools/ |
H A D | git-sync-deps | 246 thread = threading.Thread(None, function, None, args) 247 thread.start() 248 threads.append(thread) 249 for thread in threads: 250 thread.join()
|
/third_party/glfw/tests/ |
H A D | empty.c | 78 thrd_t thread; in main() local 99 if (thrd_create(&thread, thread_main, NULL) != thrd_success) in main() 101 fprintf(stderr, "Failed to create secondary thread\n"); in main() 127 thrd_join(thread, &result); in main()
|
/third_party/ltp/testcases/kernel/syscalls/sched_getattr/ |
H A D | sched_getattr01.c | 92 pthread_t thread; in main() local 103 pthread_create(&thread, NULL, run_deadline, NULL); in main() 104 pthread_join(thread, NULL); in main()
|