@@ -191,11 +191,9 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s)
191
191
* @lockname: "LOCKNAME" part of seqcount_LOCKNAME_t
192
192
* @locktype: LOCKNAME canonical C data type
193
193
* @preemptible: preemptibility of above locktype
194
- * @lockmember: argument for lockdep_assert_held()
195
- * @lockbase: associated lock release function (prefix only)
196
- * @lock_acquire: associated lock acquisition function (full call)
194
+ * @lockbase: prefix for associated lock/unlock
197
195
*/
198
- #define SEQCOUNT_LOCKNAME (lockname , locktype , preemptible , lockmember , lockbase , lock_acquire ) \
196
+ #define SEQCOUNT_LOCKNAME (lockname , locktype , preemptible , lockbase ) \
199
197
typedef struct seqcount_##lockname { \
200
198
seqcount_t seqcount; \
201
199
__SEQ_LOCK(locktype *lock); \
@@ -216,7 +214,7 @@ __seqprop_##lockname##_sequence(const seqcount_##lockname##_t *s) \
216
214
return seq; \
217
215
\
218
216
if (preemptible && unlikely(seq & 1)) { \
219
- __SEQ_LOCK(lock_acquire); \
217
+ __SEQ_LOCK(lockbase##_lock(s->lock)); \
220
218
__SEQ_LOCK(lockbase##_unlock(s->lock)); \
221
219
\
222
220
/* \
@@ -242,7 +240,7 @@ __seqprop_##lockname##_preemptible(const seqcount_##lockname##_t *s) \
242
240
static __always_inline void \
243
241
__seqprop_ ##lockname ##_assert(const seqcount_##lockname##_t *s) \
244
242
{ \
245
- __SEQ_LOCK(lockdep_assert_held(lockmember )); \
243
+ __SEQ_LOCK(lockdep_assert_held(s->lock )); \
246
244
}
247
245
248
246
/*
@@ -271,10 +269,10 @@ static inline void __seqprop_assert(const seqcount_t *s)
271
269
272
270
#define __SEQ_RT IS_ENABLED(CONFIG_PREEMPT_RT)
273
271
274
- SEQCOUNT_LOCKNAME (raw_spinlock , raw_spinlock_t , false, s -> lock , raw_spin , raw_spin_lock ( s -> lock ) )
275
- SEQCOUNT_LOCKNAME (spinlock , spinlock_t , __SEQ_RT , s -> lock , spin , spin_lock ( s -> lock ) )
276
- SEQCOUNT_LOCKNAME (rwlock , rwlock_t , __SEQ_RT , s -> lock , read , read_lock ( s -> lock ) )
277
- SEQCOUNT_LOCKNAME (mutex , struct mutex , true, s -> lock , mutex , mutex_lock ( s -> lock ) )
272
+ SEQCOUNT_LOCKNAME (raw_spinlock , raw_spinlock_t , false, raw_spin )
273
+ SEQCOUNT_LOCKNAME (spinlock , spinlock_t , __SEQ_RT , spin )
274
+ SEQCOUNT_LOCKNAME (rwlock , rwlock_t , __SEQ_RT , read )
275
+ SEQCOUNT_LOCKNAME (mutex , struct mutex , true, mutex )
278
276
279
277
/*
280
278
* SEQCNT_LOCKNAME_ZERO - static initializer for seqcount_LOCKNAME_t
0 commit comments