Re: [PATCH 2/4] [RFC] seqcount: Add lockdep functionality to seqcount/seqlockstructures

From: John Stultz
Date: Thu Sep 26 2013 - 16:59:33 EST


On 09/26/2013 01:46 PM, Steven Rostedt wrote:
> On Thu, 26 Sep 2013 11:34:22 -0700
> John Stultz <john.stultz@xxxxxxxxxx> wrote:
>
>> @@ -156,10 +214,19 @@ static inline void write_seqcount_begin(seqcount_t *s)
>> {
>> s->sequence++;
>> smp_wmb();
>> + seqcount_acquire(&s->dep_map, 0, 0, _RET_IP_);
>> +}
>> +
>> +static inline void write_seqcount_begin_nested(seqcount_t *s, int subclass)
>> +{
>> + s->sequence++;
>> + smp_wmb();
>> + seqcount_acquire(&s->dep_map, subclass, 0, _RET_IP_);
>> }
> For more code reuse, I wonder if we should have:
>
> static inline void write_seqcount_begin(seqcount_t *s)
> {
> write_seqcount_begine_nested(s, 0);
> }
>
> -- Steve

Good idea! Done.

Thanks for the review!
-john

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/