Home
last modified time | relevance | path

Searched refs:threads (Results 1 - 25 of 378) sorted by relevance

12345678910>>...16

/third_party/ltp/testcases/kernel/syscalls/tgkill/
H A Dtgkill01.c7 * of threads in parallel, then one-by-one call tgkill(..., tid, SIGUSR1)
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()
99 tst_res(TPASS, "SIGUSR1 delivered to correct threads"); in run()
[all...]
/third_party/glfw/tests/
H A Dthreads.c27 // the GLFW API is able to be used from multiple threads
86 Thread threads[] = in main() local
92 const int count = sizeof(threads) / sizeof(Thread); in main()
104 threads[i].window = glfwCreateWindow(200, 200, in main()
105 threads[i].title, in main()
107 if (!threads[i].window) in main()
113 glfwSetKeyCallback(threads[i].window, key_callback); in main()
116 glfwMakeContextCurrent(threads[0].window); in main()
122 if (thrd_create(&threads[i].id, thread_main, threads in main()
[all...]
/third_party/libuv/test/
H A Dtest-thread.c171 struct test_thread threads[8]; in TEST_IMPL() local
175 memset(threads, 0, sizeof(threads)); in TEST_IMPL()
177 for (i = 0; i < ARRAY_SIZE(threads); i++) { in TEST_IMPL()
178 r = uv_thread_create(&threads[i].thread_id, do_work, &threads[i]); in TEST_IMPL()
182 for (i = 0; i < ARRAY_SIZE(threads); i++) { in TEST_IMPL()
183 r = uv_thread_join(&threads[i].thread_id); in TEST_IMPL()
185 ASSERT_EQ(1, threads[i].thread_called); in TEST_IMPL()
203 uv_thread_t threads[ in TEST_IMPL() local
[all...]
H A Dtest-thread-affinity.c57 uv_thread_t threads[3]; in TEST_IMPL() local
61 threads[0] = GetCurrentThread(); in TEST_IMPL()
63 threads[0] = uv_thread_self(); in TEST_IMPL()
71 r = uv_thread_getaffinity(&threads[0], cpumask, cpumasksize); in TEST_IMPL()
103 ASSERT_OK(uv_thread_create(threads + 1, in TEST_IMPL()
106 ASSERT_OK(uv_thread_create(threads + 2, in TEST_IMPL()
109 ASSERT_OK(uv_thread_join(threads + 1)); in TEST_IMPL()
110 ASSERT_OK(uv_thread_join(threads + 2)); in TEST_IMPL()
127 r = uv_thread_setaffinity(&threads[0], cpumask, NULL, cpumasksize); in TEST_IMPL()
131 r = uv_thread_getaffinity(&threads[ in TEST_IMPL()
[all...]
H A Dbenchmark-async.c77 struct ctx* threads; in test_async() local
82 threads = calloc(nthreads, sizeof(threads[0])); in test_async()
83 ASSERT_NOT_NULL(threads); in test_async()
86 ctx = threads + i; in test_async()
101 ASSERT_OK(uv_thread_join(&threads[i].thread)); in test_async()
106 ctx = threads + i; in test_async()
118 free(threads); in test_async()
H A Dtest-thread-equal.c39 uv_thread_t threads[2]; in TEST_IMPL() local
45 ASSERT_OK(uv_thread_create(threads + 0, check_thread, subthreads + 0)); in TEST_IMPL()
46 ASSERT_OK(uv_thread_create(threads + 1, check_thread, subthreads + 1)); in TEST_IMPL()
47 ASSERT_OK(uv_thread_join(threads + 0)); in TEST_IMPL()
48 ASSERT_OK(uv_thread_join(threads + 1)); in TEST_IMPL()
/third_party/icu/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/collator/
H A DCollationThreadTest.java226 private void runThreads(Thread[] threads, Control control) { in runThreads() argument
227 for (int i = 0; i < threads.length; ++i) { in runThreads()
228 threads[i].start(); in runThreads()
241 for (int i = 0; i < threads.length; ++i) { in runThreads()
242 threads[i].join(); in runThreads()
259 Thread[] threads = new Thread[10]; in testThreads()
260 for (int i = 0; i < threads.length; ++i) { in testThreads()
271 threads[i] = new Thread(test); in testThreads()
274 runThreads(threads, control); in testThreads()
284 Thread[] threads in testFrozen()
[all...]
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/collator/
H A DCollationThreadTest.java229 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()
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 in testFrozen()
[all...]
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/
H A D1-2.c89 static 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/skia/third_party/externals/swiftshader/third_party/marl/src/
H A Dmarl_bench.h33 // threads from the benchmark arguments, calls f, then unbinds and destructs
48 // run() creates a scheduler, sets the number of worker threads from the
57 // threads.
59 // across from 0 to numLogicalCPUs worker threads.
61 // across [0 .. numLogicalCPUs] worker threads in 2^n steps.
64 b->ArgNames({"tasks", "threads"}); in args()
68 for (unsigned int threads = 1U; threads <= numLogicalCPUs; threads++) { in args()
69 b->Args({NumTasks, threads}); in args()
[all...]
/third_party/musl/libc-test/src/functional/
H A Dtest-malloc-info-stats-print.h38 char threads[SIZES_COUNT][MAX_TID_LEN + 1]; member
81 snprintf(test_results.threads[0], MAX_TID_LEN, "%d", (pid_t) syscall(__NR_gettid)); in get_main_thread_test_results()
115 pthread_t threads[SIZES_COUNT]; in get_different_threads_test_results() local
117 pthread_create(&threads[i], NULL, allocate_wait_free, &thread_data[i]); in get_different_threads_test_results()
122 snprintf(test_results.threads[i], MAX_TID_LEN, "%d", thread_data[i].self_id); in get_different_threads_test_results()
128 pthread_join(threads[i], NULL); in get_different_threads_test_results()
148 populate_thread_stats(test_results->stats_before_allocations, test_results->threads[0], &stats_before_allocations); in validate_main_thread_test_results()
149 populate_thread_stats(test_results->stats_after_allocations, test_results->threads[0], &stats_after_allocations); in validate_main_thread_test_results()
150 populate_thread_stats(test_results->stats_after_free, test_results->threads[0], &stats_after_free); in validate_main_thread_test_results()
174 result &= populate_thread_stats(test_results->stats_after_allocations, test_results->threads[ in validate_different_threads_test_results()
[all...]
H A Ddl_multithread_lock.c177 pthread_t *threads = (pthread_t *) malloc(sizeof(pthread_t) * num_threads); in do_test_concurrently() local
178 if (threads == NULL) { in do_test_concurrently()
185 if (pthread_create(&(threads[last]), NULL, test, NULL)) { in do_test_concurrently()
193 if (pthread_join(threads[i], NULL)) { in do_test_concurrently()
198 free(threads); in do_test_concurrently()
205 pthread_t *threads = (pthread_t *) malloc(sizeof(pthread_t) * (num_threads1 + num_threads2)); in do_test_double_concurrently() local
206 if (threads == NULL) { in do_test_double_concurrently()
213 if (pthread_create(&(threads[last]), NULL, test1, NULL)) { in do_test_double_concurrently()
221 if (pthread_create(&(threads[last]), NULL, test2, NULL)) { in do_test_double_concurrently()
229 if (pthread_join(threads[ in do_test_double_concurrently()
[all...]
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/translit/
H A DThreadTest.java28 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()
85 threads.add(new Thread() { in TestAnyTranslit()
92 for (Thread th:threads) { in TestAnyTranslit()
95 for (Thread th:threads) { in TestAnyTranslit()
/third_party/icu/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/
H A DThreadTest.java25 private ArrayList<Worker> threads = new ArrayList<Worker>(); field in ThreadTest
37 threads.add(thread); in TestThreads()
41 for (Worker thread: threads) { in TestThreads()
80 ArrayList<Thread> threads = new ArrayList<Thread>(); in TestAnyTranslit()
82 threads.add(new Thread() { in TestAnyTranslit()
89 for (Thread th:threads) { in TestAnyTranslit()
92 for (Thread th:threads) { in TestAnyTranslit()
/third_party/skia/src/core/
H A DSkExecutor.cpp69 // An SkThreadPool is an executor that runs work on a fixed pool of OS threads.
73 explicit SkThreadPool(int threads, bool allowBorrowing) : fAllowBorrowing(allowBorrowing) { in SkThreadPool() argument
74 for (int i = 0; i < threads; i++) { in SkThreadPool()
96 // Tell the Loop() threads to pick it up.
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 in MakeLIFOThreadPool()
[all...]
/third_party/skia/third_party/externals/abseil-cpp/absl/synchronization/
H A Dmutex_test.cc47 int threads) { in CreatePool()
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 > in TestTime()
46 CreatePool( int threads) CreatePool() argument
356 RunTestCommon(TestContext *cxt, void (*test)(TestContext *cxt, int), int threads, int iterations, int operations) RunTestCommon() argument
381 RunTest(void (*test)(TestContext *cxt, int), int threads, int iterations, int operations) RunTest() argument
392 RunTestWithInvariantDebugging(void (*test)(TestContext *cxt, int), int threads, int iterations, int operations, void (*invariant)(void *)) RunTestWithInvariantDebugging() argument
1615 int threads = GetParam(); global() local
1629 int threads = GetParam(); global() local
1643 int threads = GetParam(); global() local
1650 int threads = GetParam(); global() local
1664 int threads = GetParam(); global() local
1671 int threads = GetParam(); global() local
1679 int threads = 2; // TestSignal must use two threads global() local
1686 int threads = 10; // Use a fixed thread count of 10 global() local
1694 int threads = 10; // Use a fixed thread count of 10 global() local
1701 int threads = 10; // Use a fixed thread count of 10 global() local
[all...]
/third_party/skia/third_party/externals/abseil-cpp/absl/base/internal/
H A Dthread_identity_test.cc71 // Now try the same basic test with multiple threads being created and in TEST()
73 // - New threads are created without a ThreadIdentity. in TEST()
75 // - If a thread implementation chooses to recycle threads, that in TEST()
80 std::vector<std::thread> threads; in TEST() local
82 threads.push_back( in TEST()
85 for (auto& thread : threads) { in TEST()
91 // library threads allocating their own identities may preclude some in TEST()
98 // This test repeatly creates and joins a series of threads, each of in TEST()
110 std::vector<std::thread> threads; in TEST() local
112 threads in TEST()
[all...]
/third_party/mbedtls/programs/ssl/
H A Dssl_pthread_server.c95 static pthread_info_t threads[MAX_NUM_THREADS]; variable
247 if (threads[i].active == 0) { in thread_create()
251 if (threads[i].data.thread_complete == 1) { in thread_create()
253 pthread_join(threads[i].thread, NULL); in thread_create()
254 memset(&threads[i], 0, sizeof(pthread_info_t)); in thread_create()
266 memcpy(&threads[i].data, &base_info, sizeof(base_info)); in thread_create()
267 threads[i].active = 1; in thread_create()
268 memcpy(&threads[i].data.client_fd, client_fd, sizeof(mbedtls_net_context)); in thread_create()
270 if ((ret = pthread_create(&threads[i].thread, NULL, handle_ssl_connection, in thread_create()
271 &threads[ in thread_create()
[all...]
/third_party/vk-gl-cts/framework/delibs/decpp/
H A DdeSpinBarrier.cpp51 // If last threads were removed, m_numEntered > 0 && m_numRemoved > 0 in reset()
83 // m_numEntered must not be touched until all threads have had in sync()
98 // threads. Since m_numThreads only changes if all threads are inside the spinbarrier, in sync()
100 // all threads. in sync()
103 // Release all waiting threads. Since this thread has not been removed, m_numLeaving will in sync()
132 // Wait for other threads exiting previous barrier in removeThread()
150 // Release all waiting threads. in removeThread()
238 std::vector<TestThread*> threads (numThreads, static_cast<TestThread*>(DE_NULL)); in multiThreadTest()
242 threads[nd in multiThreadTest()
[all...]
/third_party/mesa3d/src/util/tests/
H A Dsparse_array_test.cpp26 #include "c11/threads.h"
56 thrd_t threads[16]; in TEST() local
57 for (unsigned i = 0; i < ARRAY_SIZE(threads); i++) { in TEST()
58 int ret = thrd_create(&threads[i], test_thread, &arr); in TEST()
62 for (unsigned i = 0; i < ARRAY_SIZE(threads); i++) { in TEST()
63 int ret = thrd_join(threads[i], NULL); in TEST()
/third_party/ltp/testcases/kernel/power_management/lib/
H A Dpm_sched_mc.py131 ''' Return number of threads in CPU. For eg for x3950 this function
132 would return 2. In future if 4 threads are supported in CPU, this
292 ''' Returns number of jobs/threads to be triggered
297 threads = get_hyper_thread_count()
299 threads = cpu_count / socket_count
302 threads = threads / get_hyper_thread_count()
304 threads = threads / get_hyper_thread_count()
306 threads
[all...]
/third_party/benchmark/test/
H A Dbenchmark_test.cc166 int thread_size = static_cast<int>(size) / state.threads(); in BM_ParallelMemset()
177 // do not overlap between threads. in BM_ParallelMemset()
234 assert(st.threads() == 1 || st.threads() == 2 || st.threads() == 3); in BM_DenseThreadRanges()
237 assert(st.threads() == 1 || st.threads() == 3 || st.threads() == 4); in BM_DenseThreadRanges()
240 assert(st.threads() == 5 || st.threads() in BM_DenseThreadRanges()
[all...]
/third_party/node/deps/uv/src/
H A Dthreadpool.c38 static uv_thread_t* threads; variable
179 if (uv_thread_join(threads + i)) in uv__threadpool_cleanup()
182 if (threads != default_threads) in uv__threadpool_cleanup()
183 uv__free(threads); in uv__threadpool_cleanup()
188 threads = NULL; in uv__threadpool_cleanup()
207 threads = default_threads; in init_threads()
209 threads = uv__malloc(nthreads * sizeof(threads[0])); in init_threads()
210 if (threads == NULL) { in init_threads()
212 threads in init_threads()
[all...]
/third_party/ffmpeg/libavcodec/
H A Dlibjxl.c33 size_t ff_libjxl_get_threadcount(int threads) in ff_libjxl_get_threadcount() argument
35 if (threads <= 0) in ff_libjxl_get_threadcount()
37 if (threads == 1) in ff_libjxl_get_threadcount()
39 return threads; in ff_libjxl_get_threadcount()
/third_party/python/Lib/test/test_importlib/partial/
H A Dpool_in_threads.py17 threads = []
19 threads.append(threading.Thread(target=t))
20 for thread in threads:
22 for thread in threads:

Completed in 11 milliseconds

12345678910>>...16