Lines Matching refs:threads
334 static void show_progress(struct worker_thread *threads, unsigned long total)
350 nitems += threads[i].items;
351 some_done = threads[i].done;
379 struct worker_thread *threads;
388 threads = malloc(num_threads * sizeof(struct worker_thread));
390 memset(&threads[i], 0, sizeof(struct worker_thread));
391 threads[i].fd = f->fd;
393 err = pthread_create(&threads[i].thread, NULL, thread_fn, &threads[i]);
400 show_progress(threads, total_items);
407 pthread_join(threads[i].thread, &ret);
408 nitems += threads[i].items;
409 *nchunks += threads[i].dupes;
412 printf("Threads(%u): %lu items processed\n", num_threads, nitems);
418 free(threads);
458 printf("Will check <%s>, size <%llu>, using %u threads\n", filename, (unsigned long long) dev_size, num_threads);
526 log_err("\t-t\tNumber of threads to use\n");