Re: [PATCH 1/5] locking: Introduce range reader/writer lock

From: Davidlohr Bueso
Date: Wed Mar 29 2017 - 11:06:16 EST


On Wed, 29 Mar 2017, Peter Zijlstra wrote:

On Mon, Mar 06, 2017 at 09:03:26PM -0800, Davidlohr Bueso wrote:
+#define RANGE_RWLOCK_INFINITY (~0UL - 1)

+#define DEFINE_RANGE_RWLOCK_INF(name) \
+ struct range_rwlock name = __RANGE_RWLOCK_INITIALIZER(0, RANGE_RWLOCK_INFINITY)

+void range_rwlock_init_inf(struct range_rwlock *lock);

Ayes I'm a pendant, but that's a very small infinity. I always thought
infinity wasn't enumerable.

:-)


Can we think of a different name here? 'whole' / 'all' / 'full' ?

Yeah, I guess 'all' is more suitable.