* Mutex and conditional variable can't be statically-initialized on Windows. */
| 200 | * Mutex and conditional variable can't be statically-initialized on Windows. |
| 201 | */ |
| 202 | static void init_thread(void) |
| 203 | { |
| 204 | int i; |
| 205 | init_recursive_mutex(&read_mutex); |
| 206 | pthread_mutex_init(&counter_mutex, NULL); |
| 207 | pthread_mutex_init(&work_mutex, NULL); |
| 208 | if (show_stat) |
| 209 | pthread_mutex_init(&deepest_delta_mutex, NULL); |
| 210 | pthread_key_create(&key, NULL); |
| 211 | CALLOC_ARRAY(thread_data, nr_threads); |
| 212 | for (i = 0; i < nr_threads; i++) { |
| 213 | thread_data[i].pack_fd = xopen(curr_pack, O_RDONLY); |
| 214 | } |
| 215 | |
| 216 | threads_active = 1; |
| 217 | } |
| 218 | |
| 219 | static void cleanup_thread(void) |
| 220 | { |
no test coverage detected