Searched refs:threads (Results 251 - 271 of 271) sorted by path

<<11

/linux-master/tools/testing/selftests/dma/
H A Ddma_map_benchmark.c29 int threads = 1, seconds = 20, node = -1; local
41 threads = atoi(optarg);
66 if (threads <= 0 || threads > DMA_MAP_MAX_THREADS) {
67 fprintf(stderr, "invalid number of threads, must be in 1-%d\n",
109 map.threads = threads;
121 printf("dma mapping benchmark: threads:%d seconds:%d node:%d dir:%s granule: %d\n",
122 threads, seconds, node, dir[directions], granule);
/linux-master/tools/testing/selftests/filesystems/binderfs/
H A Dbinderfs_test.c405 pthread_t threads[DEFAULT_THREADS]; local
461 ret = pthread_create(&threads[i], &attr, binder_version_thread, INT_TO_PTR(fds[k]));
472 ret = pthread_join(threads[j], &fdptr);
/linux-master/tools/testing/selftests/filesystems/epoll/
H A Depoll_wakeup_test.c3251 /* Create waiter threads */
3364 pthread_t threads[3]; local
3368 * Start 3 threads:
3377 * If no events are missed, all three threads should eventually
3380 ASSERT_EQ(pthread_create(&threads[0], NULL,
3382 ASSERT_EQ(pthread_create(&threads[1], NULL,
3384 ASSERT_EQ(pthread_create(&threads[2], NULL,
3387 for (n = 0; n < ARRAY_SIZE(threads); ++n)
3388 ASSERT_EQ(pthread_join(threads[n], NULL), 0);
3476 * main will act as the emitter once both waiter threads ar
[all...]
/linux-master/tools/testing/selftests/kvm/
H A Dhardware_disable_test.c89 pthread_t threads[VCPU_NUM]; local
104 check_create_thread(&threads[i], NULL, run_vcpu, vcpu);
105 check_set_affinity(threads[i], &cpu_set);
113 pr_debug("%s: [%d] all threads launched\n", __func__, run);
116 check_join(threads[i], &b);
H A Dmax_guest_memory_test.c92 pthread_t *threads; local
95 threads = malloc(nr_vcpus * sizeof(*threads));
96 TEST_ASSERT(threads, "Failed to allocate vCPU threads");
109 pthread_create(&threads[i], NULL, vcpu_worker, &info[i]);
111 return threads;
169 pthread_t *threads; local
249 threads = spawn_workers(vm, vcpus, start_gpa, gpa);
283 pthread_join(threads[
[all...]
/linux-master/tools/testing/selftests/kvm/x86_64/
H A Dhyperv_ipi.c245 pthread_t threads[2]; local
273 r = pthread_create(&threads[0], NULL, vcpu_thread, vcpu[1]);
276 r = pthread_create(&threads[1], NULL, vcpu_thread, vcpu[2]);
303 cancel_join_vcpu_thread(threads[0], vcpu[1]);
304 cancel_join_vcpu_thread(threads[1], vcpu[2]);
H A Dhyperv_tlb_flush.c583 pthread_t threads[2]; local
646 r = pthread_create(&threads[0], NULL, vcpu_thread, vcpu[1]);
649 r = pthread_create(&threads[1], NULL, vcpu_thread, vcpu[2]);
675 cancel_join_vcpu_thread(threads[0], vcpu[1]);
676 cancel_join_vcpu_thread(threads[1], vcpu[2]);
H A Dprivate_mem_conversions_test.c381 pthread_t threads[KVM_MAX_VCPUS]; local
415 pthread_create(&threads[i], NULL, __test_mem_conversions, vcpus[i]);
421 pthread_join(threads[i], NULL);
H A Dxapic_ipi_test.c398 pthread_t threads[2]; local
431 r = pthread_create(&threads[0], NULL, vcpu_thread, &params[0]);
450 r = pthread_create(&threads[1], NULL, vcpu_thread, &params[1]);
463 * Cancel threads and wait for them to stop.
465 cancel_join_vcpu_thread(threads[0], params[0].vcpu);
466 cancel_join_vcpu_thread(threads[1], params[1].vcpu);
/linux-master/tools/testing/selftests/mm/
H A Dmigration.c25 pthread_t *threads; local
51 self->threads = malloc(self->nthreads * sizeof(*self->threads));
52 ASSERT_NE(self->threads, NULL);
59 free(self->threads);
115 * between nodes whilst other threads try and access them triggering the
124 SKIP(return, "Not enough threads or NUMA nodes available");
132 if (pthread_create(&self->threads[i], NULL, access_mem, ptr))
137 ASSERT_EQ(pthread_cancel(self->threads[i]), 0);
150 SKIP(return, "Not enough threads o
[all...]
/linux-master/tools/testing/selftests/mount_setattr/
H A Dmount_setattr_test.c908 pthread_t threads[DEFAULT_THREADS]; local
916 /* Try to change mount options from multiple threads. */
923 ASSERT_EQ(pthread_create(&threads[i], &pattr, mount_setattr_thread, NULL), 0);
928 EXPECT_EQ(pthread_join(threads[j], &retptr), 0);
/linux-master/tools/testing/selftests/perf_events/
H A Dsigtrap_threads.c3 * Test for perf events with SIGTRAP across all threads.
38 /* Data shared between test body, threads, and signal handler. */
40 int tids_want_signal; /* Which threads still want a signal. */
80 * across threads.
113 pthread_t threads[NUM_THREADS]; local
136 /* Spawn threads inheriting perf event. */
139 ASSERT_EQ(pthread_create(&self->threads[i], NULL, test_thread, &self->barrier), 0);
156 ASSERT_EQ(pthread_join(self->threads[i], NULL), 0);
232 ASSERT_EQ(pthread_join(self->threads[i], NULL), 0);
/linux-master/tools/testing/selftests/powerpc/dscr/
H A Ddscr_default_test.c6 * it's sysfs interface and then verifies that all threads
121 struct random_thread_args threads[THREADS]; local
137 threads[i].expected_system_dscr = &expected_system_dscr;
138 threads[i].rw_lock = &rw_lock;
139 threads[i].barrier = &barrier;
141 FAIL_IF(pthread_create(&threads[i].thread_id, NULL,
142 dscr_default_random_thread, (void *)&threads[i]));
146 FAIL_IF(pthread_join(threads[i].thread_id, NULL));
H A Ddscr_explicit_test.c135 struct random_thread_args threads[THREADS]; local
143 threads[i].do_yields = i % 2 == 0;
144 threads[i].barrier = &barrier;
146 FAIL_IF(pthread_create(&threads[i].thread_id, NULL,
147 dscr_explicit_random_thread, (void *)&threads[i]));
151 FAIL_IF(pthread_join(threads[i].thread_id, NULL));
/linux-master/tools/testing/selftests/powerpc/math/
H A Dfpu_preempt.c8 * threads and a long wait. As such, a successful test doesn't mean much but
28 * worker threads
53 int i, rc, threads; local
56 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR;
57 tids = malloc((threads) * sizeof(pthread_t));
61 threads_starting = threads;
62 for (i = 0; i < threads; i++) {
84 for (i = 0; i < threads; i++) {
H A Dfpu_signal.c27 * worker threads
73 int i, j, rc, threads; local
77 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR;
78 tids = malloc(threads * sizeof(pthread_t));
82 threads_starting = threads;
83 for (i = 0; i < threads; i++) {
94 printf("\tSending signals to all threads %d times...", ITERATIONS);
96 for (j = 0; j < threads; j++) {
105 for (i = 0; i < threads; i++) {
H A Dvmx_preempt.c8 * no way to be sure preemption happened so this test just uses many threads
28 * worker threads
59 int i, rc, threads; local
65 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR;
66 tids = malloc(threads * sizeof(pthread_t));
70 threads_starting = threads;
71 for (i = 0; i < threads; i++) {
93 for (i = 0; i < threads; i++) {
H A Dvmx_signal.c28 * worker threads
95 int i, j, rc, threads; local
102 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR;
103 tids = malloc(threads * sizeof(pthread_t));
107 threads_starting = threads;
108 for (i = 0; i < threads; i++) {
114 printf("\tWaiting for %d workers to start... %d", threads, threads_starting);
122 printf("\tSending signals to all threads %d times...", ITERATIONS);
124 for (j = 0; j < threads; j++) {
133 for (i = 0; i < threads;
[all...]
H A Dvsx_preempt.c7 * uses many threads and a long wait. As such, a successful test
27 * worker threads
92 int i, rc, threads; local
97 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR;
98 tids = malloc(threads * sizeof(pthread_t));
102 threads_starting = threads;
103 for (i = 0; i < threads; i++) {
125 for (i = 0; i < threads; i++) {
/linux-master/tools/testing/selftests/powerpc/signal/
H A Dsigfuz.c46 #define THREADS 16 /* Number of threads */
252 pthread_t *threads; local
254 threads = malloc(nthread * sizeof(pthread_t));
257 rc = pthread_create(&threads[t], NULL, sigfuz_test,
264 rc = pthread_join(threads[t], NULL);
269 free(threads);
284 printf("\t-t\t Amount of threads. (Default = %d)\n", THREADS);
/linux-master/tools/testing/selftests/powerpc/tm/
H A Dtm-vmx-unavail.c90 int threads; local
98 threads = sysconf(_SC_NPROCESSORS_ONLN) * 4;
99 thread = malloc(sizeof(pthread_t)*threads);
103 for (uint64_t i = 0; i < threads; i++)
106 for (uint64_t i = 0; i < threads; i++)

Completed in 295 milliseconds

<<11