/third_party/boost/libs/thread/test/threads/container/ |
D | thread_vector_pass.cpp | 55 thread_vector threads; in main() local 56 threads.reserve(10); in main() 60 threads.push_back(boost::move(th)); in main() 62 join_all(threads); in main() 66 thread_vector threads; in main() local 67 threads.reserve(10); in main() 70 threads.push_back(BOOST_THREAD_MAKE_RV_REF(boost::thread(&increment_count))); in main() 72 join_all(threads); in main() 76 thread_vector threads; in main() local 77 threads.reserve(10); in main() [all …]
|
D | thread_ptr_list_pass.cpp | 62 thread_ptr_list threads; in main() local 66 threads.push_back(thread_ptr(new boost::thread(&increment_count))); in main() 68 BOOST_TEST(threads.size()==10); in main() 70 for (thread_ptr_list::iterator it = threads.begin(); it != threads.end(); ++it) in main() 80 thread_ptr_list threads; in main() local 84 threads.push_back(thread_ptr(new boost::thread(&increment_count))); in main() 86 BOOST_TEST(threads.size()==10); in main() 88 threads.push_back(sth); in main() 89 BOOST_TEST(threads.size()==11); in main() 90 threads.remove(sth); in main() [all …]
|
/third_party/boost/libs/thread/example/ |
D | thread_group.cpp | 33 boost::thread_group threads; in main() local 35 threads.create_thread(&increment_count); in main() 36 threads.join_all(); in main() 40 boost::thread_group threads; in main() local 42 threads.create_thread(&increment_count); in main() 43 threads.interrupt_all(); in main() 44 threads.join_all(); in main() 48 boost::thread_group threads; in main() local 50 threads.add_thread(th); in main() 51 BOOST_TEST(! threads.is_this_thread_in()); in main() [all …]
|
/third_party/boost/boost/thread/detail/ |
D | thread_group.hpp | 32 for(std::list<thread*>::iterator it=threads.begin(),end=threads.end(); in ~thread_group() 44 for(std::list<thread*>::iterator it=threads.begin(),end=threads.end(); in is_this_thread_in() 60 for(std::list<thread*>::iterator it=threads.begin(),end=threads.end(); in is_thread_in() 80 threads.push_back(new_thread.get()); in create_thread() 93 threads.push_back(thrd); in add_thread() 100 std::list<thread*>::iterator const it=std::find(threads.begin(),threads.end(),thrd); in remove_thread() 101 if(it!=threads.end()) in remove_thread() 103 threads.erase(it); in remove_thread() 114 for(std::list<thread*>::iterator it=threads.begin(),end=threads.end(); in join_all() 128 for(std::list<thread*>::iterator it=threads.begin(),end=threads.end(); in interrupt_all() [all …]
|
/third_party/flutter/glfw/tests/ |
D | threads.c | 78 Thread threads[] = in main() local 84 const int count = sizeof(threads) / sizeof(Thread); in main() 95 threads[i].window = glfwCreateWindow(200, 200, in main() 96 threads[i].title, in main() 98 if (!threads[i].window) in main() 104 glfwSetWindowPos(threads[i].window, 200 + 250 * i, 200); in main() 105 glfwShowWindow(threads[i].window); in main() 108 glfwMakeContextCurrent(threads[0].window); in main() 114 if (thrd_create(&threads[i].id, thread_main, threads + i) != in main() 130 if (glfwWindowShouldClose(threads[i].window)) in main() [all …]
|
/third_party/boost/boost/thread/executors/ |
D | basic_thread_pool.hpp | 40 thread_vector threads; member in boost::executors::basic_thread_pool 145 threads.reserve(thread_count); in basic_thread_pool() 150 threads.push_back(thread_t(boost::move(th))); in basic_thread_pool() 152 threads.push_back(thread_t(&basic_thread_pool::worker_thread, this)); // do not compile in basic_thread_pool() 174 threads.reserve(thread_count); in basic_thread_pool() 178 threads.push_back(thread_t(boost::move(th))); in basic_thread_pool() 193 threads.reserve(thread_count); in basic_thread_pool() 197 threads.push_back(thread_t(boost::move(th))); in basic_thread_pool() 212 threads.reserve(thread_count); in basic_thread_pool() 216 threads.push_back(thread_t(boost::move(th))); in basic_thread_pool() [all …]
|
/third_party/ltp/testcases/kernel/syscalls/tgkill/ |
D | tgkill01.c | 25 static struct thread_state *threads; variable 66 if (threads[i].tid == -1) in stop_threads() 69 SAFE_PTHREAD_JOIN(threads[i].thread, NULL); in stop_threads() 70 threads[i].tid = -1; in stop_threads() 73 if (threads) in stop_threads() 74 free(threads); in stop_threads() 84 TEST(sys_tgkill(getpid(), threads[i].tid, SIGUSR1)); in run() 93 if (!pthread_equal(sigusr1_thread, threads[i].thread)) { in run() 109 threads = SAFE_MALLOC(sizeof(*threads) * n_threads); in setup() 117 threads[i].tid = -1; in setup() [all …]
|
/third_party/openssl/Configurations/ |
D | 10-main.conf | 230 cflags => add(threads("-pthread")), 232 ex_libs => add(threads("-pthread")), 251 cflags => add_before("-m64", threads("-pthread")), 253 ex_libs => add(threads("-pthread")), 280 cppflags => add(threads("-D_REENTRANT")), 283 lflags => add(threads("-mt")), 284 ex_libs => add(threads("-lpthread")), 299 cflags => add(threads("-pthread")), 301 ex_libs => add(threads("-pthread")), 333 cppflags => add(threads("-D_REENTRANT")), [all …]
|
/third_party/mingw-w64/mingw-w64-libraries/winpthreads/tests_pthread/ |
D | rwlock7.c | 40 static thread_t threads[THREADS]; variable 132 threads[count].thread_num = count; in main() 133 threads[count].updates = 0; in main() 134 threads[count].reads = 0; in main() 135 threads[count].seed = 1 + rand_r (&seed) % 71; in main() 137 assert(pthread_create (&threads[count].thread_id, in main() 138 NULL, thread_routine, (void*)&threads[count]) == 0); in main() 147 assert(pthread_join (threads[count].thread_id, NULL) == 0); in main() 155 if (threads[count].changed > 0) in main() 158 count, threads[count].changed); in main() [all …]
|
D | rwlock8.c | 43 static thread_t threads[THREADS]; variable 141 threads[count].thread_num = count; in main() 142 threads[count].updates = 0; in main() 143 threads[count].reads = 0; in main() 144 threads[count].seed = 1 + rand_r (&seed) % 71; in main() 146 assert(pthread_create (&threads[count].thread_id, in main() 147 NULL, thread_routine, (void*)&threads[count]) == 0); in main() 156 assert(pthread_join (threads[count].thread_id, NULL) == 0); in main() 164 if (threads[count].changed > 0) in main() 167 count, threads[count].changed); in main() [all …]
|
/third_party/libwebsockets/minimal-examples/ws-server/minimal-ws-server-threads-smp/ |
D | README.md | 1 # lws minimal ws server (threads) + SMP 3 This demonstrates both independent threads creating content 4 as in the -threads example, and multiple service threads 21 $ ./lws-minimal-ws-server-threads-smp 22 [2019/01/28 06:59:17:4217] USER: LWS minimal ws server + threads + smp | visit http://localhost:7681 23 [2019/01/28 06:59:17:4219] NOTICE: Service threads: 2 32 Two lws service threads are started. 34 Two separate asynchronous threads generate strings and add them to a ringbuffer, 35 signalling all lws service threads to send new entries to all the browser windows. 38 and hook it up to the lws service threads.
|
/third_party/glib/glib/tests/ |
D | once.c | 110 GThread *threads[THREADS]; in test_once_multi_threaded() local 114 for (i = 0; i < G_N_ELEMENTS (threads); i++) in test_once_multi_threaded() 115 threads[i] = g_thread_new ("once-multi-threaded", in test_once_multi_threaded() 117 GUINT_TO_POINTER (G_N_ELEMENTS (threads))); in test_once_multi_threaded() 122 for (i = 0; i < G_N_ELEMENTS (threads); i++) in test_once_multi_threaded() 123 g_thread_join (threads[i]); in test_once_multi_threaded() 177 GThread *threads[THREADS]; in test_once_init_multi_threaded() local 183 for (i = 0; i < G_N_ELEMENTS (threads); i++) in test_once_init_multi_threaded() 184 threads[i] = g_thread_new ("once-init-multi-threaded", thread_func, NULL); in test_once_init_multi_threaded() 186 for (i = 0; i < G_N_ELEMENTS (threads); i++) in test_once_init_multi_threaded() [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/marl/src/ |
D | marl_bench.h | 68 for (unsigned int threads = 1U; threads <= numLogicalCPUs; threads++) { in args() local 69 b->Args({NumTasks, threads}); in args() 72 for (unsigned int threads = 1U; threads <= numLogicalCPUs; threads *= 2) { in args() local 73 b->Args({NumTasks, threads}); in args()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/ |
D | 1-2.c | 89 pthread_t threads[3]; variable 96 threads[0] = pthread_self(); in prepare() 101 threads[1] = pthread_self(); in parent() 106 threads[2] = pthread_self(); in child() 137 if (!pthread_equal(ch, threads[0])) { in threaded() 142 if (!pthread_equal(pthread_self(), threads[2])) { in threaded() 151 if (!pthread_equal(ch, threads[0])) { in threaded() 156 if (!pthread_equal(pthread_self(), threads[1])) { in threaded()
|
/third_party/protobuf/objectivec/Tests/ |
D | GPBConcurrencyTests.m | 68 - (void)startThreads:(NSArray *)threads { 69 for (NSThread *thread in threads) { 74 - (void)joinThreads:(NSArray *)threads { 75 for (NSThread *thread in threads) { 91 NSArray *threads = 94 [self startThreads:threads]; 95 [self joinThreads:threads]; 111 NSArray *threads = 114 [self startThreads:threads]; 115 [self joinThreads:threads]; [all …]
|
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/collator/ |
D | CollationThreadTest.java | 229 private void runThreads(Thread[] threads, Control control) { in runThreads() argument 230 for (int i = 0; i < threads.length; ++i) { in runThreads() 231 threads[i].start(); in runThreads() 244 for (int i = 0; i < threads.length; ++i) { in runThreads() 245 threads[i].join(); in runThreads() 262 Thread[] threads = new Thread[10]; in testThreads() local 263 for (int i = 0; i < threads.length; ++i) { in testThreads() 274 threads[i] = new Thread(test); in testThreads() 277 runThreads(threads, control); in testThreads() 287 Thread[] threads = new Thread[10]; in testFrozen() local [all …]
|
/third_party/libuv/test/ |
D | test-thread.c | 175 struct test_thread threads[8]; in TEST_IMPL() local 179 memset(threads, 0, sizeof(threads)); in TEST_IMPL() 181 for (i = 0; i < ARRAY_SIZE(threads); i++) { in TEST_IMPL() 182 r = uv_thread_create(&threads[i].thread_id, do_work, &threads[i]); in TEST_IMPL() 186 for (i = 0; i < ARRAY_SIZE(threads); i++) { in TEST_IMPL() 187 r = uv_thread_join(&threads[i].thread_id); in TEST_IMPL() 189 ASSERT(threads[i].thread_called == 1); in TEST_IMPL() 207 uv_thread_t threads[2]; in TEST_IMPL() local 212 ASSERT(0 == uv_thread_create(threads + 0, tls_thread, threads + 0)); in TEST_IMPL() 213 ASSERT(0 == uv_thread_create(threads + 1, tls_thread, threads + 1)); in TEST_IMPL() [all …]
|
D | benchmark-async.c | 76 struct ctx* threads; in test_async() local 81 threads = calloc(nthreads, sizeof(threads[0])); in test_async() 82 ASSERT_NOT_NULL(threads); in test_async() 85 ctx = threads + i; in test_async() 100 ASSERT(0 == uv_thread_join(&threads[i].thread)); in test_async() 105 ctx = threads + i; in test_async() 117 free(threads); in test_async()
|
D | test-thread-equal.c | 39 uv_thread_t threads[2]; in TEST_IMPL() local 45 ASSERT(0 == uv_thread_create(threads + 0, check_thread, subthreads + 0)); in TEST_IMPL() 46 ASSERT(0 == uv_thread_create(threads + 1, check_thread, subthreads + 1)); in TEST_IMPL() 47 ASSERT(0 == uv_thread_join(threads + 0)); in TEST_IMPL() 48 ASSERT(0 == uv_thread_join(threads + 1)); in TEST_IMPL()
|
/third_party/grpc/test/core/gpr/ |
D | spinlock_test.cc | 38 grpc_core::Thread* threads; member 48 static struct test* test_new(int threads, int64_t iterations, int incr_step) { in test_new() argument 50 m->thread_count = threads; in test_new() 51 m->threads = static_cast<grpc_core::Thread*>( in test_new() 52 gpr_malloc(sizeof(*m->threads) * static_cast<size_t>(threads))); in test_new() 63 gpr_free(m->threads); in test_destroy() 71 m->threads[i] = grpc_core::Thread("grpc_create_threads", body, m); in test_create_threads() 72 m->threads[i].Start(); in test_create_threads() 80 m->threads[i].Join(); in test_wait()
|
/third_party/mingw-w64/mingw-w64-crt/testcases/ |
D | t_tls.cpp | 30 HANDLE threads[processors]; in main() local 33 threads[i] = (HANDLE)_beginthreadex(0, 0, thread_fn, 0, CREATE_SUSPENDED, 0); in main() 34 SetThreadAffinityMask(threads[i], 1 << i); in main() 38 ResumeThread(threads[i]); in main() 40 WaitForMultipleObjects(processors, threads, 1, INFINITE); in main() 42 CloseHandle(threads[i]); in main()
|
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/translit/ |
D | ThreadTest.java | 28 private ArrayList<Worker> threads = new ArrayList<Worker>(); field in ThreadTest 40 threads.add(thread); in TestThreads() 44 for (Worker thread: threads) { in TestThreads() 83 ArrayList<Thread> threads = new ArrayList<Thread>(); in TestAnyTranslit() local 85 threads.add(new Thread() { in TestAnyTranslit() 92 for (Thread th:threads) { in TestAnyTranslit() 95 for (Thread th:threads) { in TestAnyTranslit()
|
/third_party/abseil-cpp/absl/synchronization/ |
D | mutex_test.cc | 47 int threads) { in CreatePool() argument 48 return absl::make_unique<absl::synchronization_internal::ThreadPool>(threads); in CreatePool() 69 int threads; member 164 mc.target += cxt->threads; in TestAwait() 181 target += cxt->threads; in TestSignalAll() 187 ABSL_RAW_CHECK(cxt->threads == 2, "TestSignal should use 2 threads"); in TestSignal() 199 target += cxt->threads; in TestSignal() 216 target += cxt->threads; in TestCVTimeout() 225 ABSL_RAW_CHECK(cxt->threads > 2, "TestTime should use more than 2 threads"); in TestTime() 299 ABSL_RAW_CHECK(cxt->g0 == cxt->threads, "TestTime failed"); in TestTime() [all …]
|
/third_party/flutter/skia/src/core/ |
D | SkExecutor.cpp | 76 explicit SkThreadPool(int threads) { in SkThreadPool() argument 77 for (int i = 0; i < threads; i++) { in SkThreadPool() 144 std::unique_ptr<SkExecutor> SkExecutor::MakeFIFOThreadPool(int threads) { in MakeFIFOThreadPool() argument 146 return skstd::make_unique<SkThreadPool<WorkList>>(threads > 0 ? threads : num_cores()); in MakeFIFOThreadPool() 148 std::unique_ptr<SkExecutor> SkExecutor::MakeLIFOThreadPool(int threads) { in MakeLIFOThreadPool() argument 150 return skstd::make_unique<SkThreadPool<WorkList>>(threads > 0 ? threads : num_cores()); in MakeLIFOThreadPool()
|
/third_party/skia/src/core/ |
D | SkExecutor.cpp | 73 explicit SkThreadPool(int threads, bool allowBorrowing) : fAllowBorrowing(allowBorrowing) { in SkThreadPool() argument 74 for (int i = 0; i < threads; i++) { in SkThreadPool() 142 std::unique_ptr<SkExecutor> SkExecutor::MakeFIFOThreadPool(int threads, bool allowBorrowing) { in MakeFIFOThreadPool() argument 144 return std::make_unique<SkThreadPool<WorkList>>(threads > 0 ? threads : num_cores(), in MakeFIFOThreadPool() 147 std::unique_ptr<SkExecutor> SkExecutor::MakeLIFOThreadPool(int threads, bool allowBorrowing) { in MakeLIFOThreadPool() argument 149 return std::make_unique<SkThreadPool<WorkList>>(threads > 0 ? threads : num_cores(), in MakeLIFOThreadPool()
|