Re: [PATCH v3 2/2] pack-objects: merge read_lock and lock in packing_data struct

2019-01-24 Thread Patrick Hogg
On Thu, Jan 24, 2019 at 2:49 PM Junio C Hamano wrote: > > Duy Nguyen writes: > > > On Thu, Jan 24, 2019 at 8:06 AM Patrick Hogg wrote: > >> diff --git a/pack-objects.h b/pack-objects.h > >> index 0a038e3bc..dc869f26c 100644 > >> --- a/pack-objects.h > >> +++ b/pack-objects.h > >> @@ -146,7 +146,

Re: [PATCH v3 2/2] pack-objects: merge read_lock and lock in packing_data struct

2019-01-24 Thread Junio C Hamano
Duy Nguyen writes: > On Thu, Jan 24, 2019 at 8:06 AM Patrick Hogg wrote: >> diff --git a/pack-objects.h b/pack-objects.h >> index 0a038e3bc..dc869f26c 100644 >> --- a/pack-objects.h >> +++ b/pack-objects.h >> @@ -146,7 +146,6 @@ struct packing_data { >> struct packed_git **in_pack; >> >>

Re: [PATCH v3 2/2] pack-objects: merge read_lock and lock in packing_data struct

2019-01-24 Thread Duy Nguyen
On Thu, Jan 24, 2019 at 8:06 AM Patrick Hogg wrote: > diff --git a/pack-objects.h b/pack-objects.h > index 0a038e3bc..dc869f26c 100644 > --- a/pack-objects.h > +++ b/pack-objects.h > @@ -146,7 +146,6 @@ struct packing_data { > struct packed_git **in_pack; > > pthread_mutex_t lock;

[PATCH v3 2/2] pack-objects: merge read_lock and lock in packing_data struct

2019-01-23 Thread Patrick Hogg
Upgrade the packing_data lock 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 Hog