Lines Matching refs:threads
33 OPT_UINTEGER('t', "threads", &thread_params.nthreads, "Specify amount of threads"),
89 pthread_t *threads;
91 threads = calloc(thread_params.nthreads, sizeof(threads[0]));
92 if (!threads)
98 if (pthread_create(&threads[i], NULL, passive_thread, &done))
104 pthread_join(threads[i], NULL);
106 free(threads);
111 // then starts nparallel threads which create and join bench_repeat batches of nthreads threads.
155 printf("# Created/joined %d threads with %d breakpoints and %d parallelism\n",
185 OPT_UINTEGER('p', "passive", &enable_params.npassive, "Specify amount of passive threads"),
186 OPT_UINTEGER('a', "active", &enable_params.nactive, "Specify amount of active threads"),
196 // then starts npassive threads that block and nactive threads that actively spin
203 pthread_t *threads;
220 threads = calloc(nthreads, sizeof(threads[0]));
221 if (!threads)
225 if (pthread_create(&threads[i], NULL,
229 usleep(10000); // let the threads block
242 pthread_join(threads[i], NULL);
243 free(threads);
247 printf("# Enabled/disabled breakpoint %d time with %d passive and %d active threads\n",