Re: [PATCH v2 1/7] locking: Introduce local_lock()
From: Ingo Molnar
Date: Mon May 25 2020 - 03:12:20 EST
* Ingo Molnar <mingo@xxxxxxxxxx> wrote:
> ( The other departure from spinlocks is that the 'spinlock_t' name,
> without underscores, while making the API names such as spin_lock()
> with an underscore, was a conscious didactic choice. Applying that
> principle to local locks gives us the spinlock_t-equivalent name of
> 'locallock_t' - but the double 'l' reads a bit weirdly in this
> context. So I think using 'local_lock_t' as the data structure is
> probably the better approach. )
BTW., along this argument, I believe we should rename the local-lock
header file from <linux/locallock.h> to <linux/local_lock.h>.
The reason for the <linux/spinlock.h> naming is that the main data
structure is spinlock_t.
Having <linux/locallock.h> for 'struct local_lock' or 'local_lock_t'
would introduce an idiosyncratic namespace quirk for no good reason.