Lines Matching full:threads
33 OPT_UINTEGER('t', "threads", &thread_params.nthreads, "Specify amount of threads"),
89 pthread_t *threads; in breakpoint_thread() local
91 threads = calloc(thread_params.nthreads, sizeof(threads[0])); in breakpoint_thread()
92 if (!threads) in breakpoint_thread()
98 if (pthread_create(&threads[i], NULL, passive_thread, &done)) in breakpoint_thread()
104 pthread_join(threads[i], NULL); in breakpoint_thread()
106 free(threads); in breakpoint_thread()
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", in bench_breakpoint_thread()
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; in bench_breakpoint_enable() local
220 threads = calloc(nthreads, sizeof(threads[0])); in bench_breakpoint_enable()
221 if (!threads) in bench_breakpoint_enable()
225 if (pthread_create(&threads[i], NULL, in bench_breakpoint_enable()
229 usleep(10000); // let the threads block in bench_breakpoint_enable()
242 pthread_join(threads[i], NULL); in bench_breakpoint_enable()
243 free(threads); in bench_breakpoint_enable()
247 printf("# Enabled/disabled breakpoint %d time with %d passive and %d active threads\n", in bench_breakpoint_enable()