diff options
author | Patrick Hogg <phogg@novamoon.net> | 2019-01-24 19:22:05 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-28 11:22:12 -0800 |
commit | edb673cf1001eeff140370c41139aaa06e67cea0 (patch) | |
tree | 0b21611c4c5edcb3f27f5622b64b4459f68d8699 /pack-objects.c | |
parent | pack-objects: move read mutex to packing_data struct (diff) | |
download | tgif-edb673cf1001eeff140370c41139aaa06e67cea0.tar.xz |
pack-objects: merge read_lock and lock in packing_data struct
Rename the packing_data lock to obd_lock and upgrade it to a recursive
mutex to make it suitable for current read_lock usages. Additionally
remove the superfluous #ifndef NO_PTHREADS guard around mutex
initialization in prepare_packing_data as the mutex functions
themselves are already protected.
Signed-off-by: Patrick Hogg <phogg@novamoon.net>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-objects.c')
-rw-r--r-- | pack-objects.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/pack-objects.c b/pack-objects.c index 3554c43ac2..a1dc5eb726 100644 --- a/pack-objects.c +++ b/pack-objects.c @@ -148,10 +148,7 @@ void prepare_packing_data(struct packing_data *pdata) 1U << OE_SIZE_BITS); pdata->oe_delta_size_limit = git_env_ulong("GIT_TEST_OE_DELTA_SIZE", 1UL << OE_DELTA_SIZE_BITS); -#ifndef NO_PTHREADS - pthread_mutex_init(&pdata->lock, NULL); - init_recursive_mutex(&pdata->read_lock); -#endif + init_recursive_mutex(&pdata->odb_lock); } struct object_entry *packlist_alloc(struct packing_data *pdata, |