Re: [PATCH v3 2/2] pack-objects: merge read_lock and lock in packing_data struct
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jan 24, 2019, 08:33 UTC
- Message-ID
- <CACsJy8BDn-WBci72-DaAmc=SJsDnaiiN_rW+Yjb-1G1KFH7eCw@mail.gmail.com>
- In-Reply-To
- <20190124010521.28452-2-phogg@novamoon.net>
On Thu, Jan 24, 2019 at 8:06 AM Patrick Hogg <phogg@novamoon.net> wrote:
Show 9 quoted lines
> 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;
> - pthread_mutex_t read_lock;"lock" without any comments in this struct, to me, implies that it protects access to this struct alone. But since you're using it as "read lock" (aka access to object database), I think you should add a comment here clarify the new role of "lock" variable.
-- Duy