MCPcopy Create free account
hub / github.com/git/git / init_thread

Function init_thread

builtin/index-pack.c:202–217  ·  view source on GitHub ↗

* Mutex and conditional variable can't be statically-initialized on Windows. */

Source from the content-addressed store, hash-verified

200 * Mutex and conditional variable can't be statically-initialized on Windows.
201 */
202static 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
219static void cleanup_thread(void)
220{

Callers 1

resolve_deltasFunction · 0.85

Calls 3

init_recursive_mutexFunction · 0.85
pthread_key_createFunction · 0.85
xopenFunction · 0.85

Tested by

no test coverage detected