lkml.org 
[lkml]   [2020]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/7] locking: Introduce local_lock()

* Ingo Molnar <mingo@kernel.org> 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.

Thanks,

Ingo

\
 
 \ /
  Last update: 2020-05-25 09:12    [W:0.064 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site