Messages in this thread | | | Date | Thu, 26 Sep 2013 13:59:24 -0700 | From | John Stultz <> | Subject | Re: [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
| |