lkml.org 
[lkml]   [2013]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] [RFC] seqcount: Add lockdep functionality to seqcount/seqlock structures
On 09/26/2013 01:46 PM, Steven Rostedt wrote:
> On Thu, 26 Sep 2013 11:34:22 -0700
> John Stultz <john.stultz@linaro.org> 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



\
 
 \ /
  Last update: 2013-09-26 23:21    [W:0.048 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site