Re: [PATCH v1 3/5] seqlock: seqcount_t: Implement all read APIs as statement expressions

2020-08-28 Thread Ahmed S. Darwish
On Fri, Aug 28, 2020 at 10:30:22AM +0200, pet...@infradead.org wrote: > On Fri, Aug 28, 2020 at 03:07:08AM +0200, Ahmed S. Darwish wrote: > > #define __read_seqcount_begin(s) \ > > +({ \ > > + unsig

Re: [PATCH v1 3/5] seqlock: seqcount_t: Implement all read APIs as statement expressions

2020-08-28 Thread peterz
On Fri, Aug 28, 2020 at 03:07:08AM +0200, Ahmed S. Darwish wrote: > #define __read_seqcount_begin(s) \ > +({ \ > + unsigned seq; \ > +

[PATCH v1 3/5] seqlock: seqcount_t: Implement all read APIs as statement expressions

2020-08-27 Thread Ahmed S. Darwish
The sequence counters read APIs are implemented as CPP macros, so they can take either seqcount_t or any of the seqcount_LOCKTYPE_t variants. Such macros then get *directly* transformed to internal C functions that only take plain seqcount_t. Further commits need access to seqcount_LOCKTYPE_t insi