Re: [PATCH v2 1/3] locking: Document the semantics of spin_is_locked()
From: Andrea Parri
Date: Tue Apr 03 2018 - 15:31:56 EST
On Tue, Apr 03, 2018 at 04:23:07PM +0100, David Howells wrote:
> Andrea Parri <andrea.parri@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> > Sorry, but I don't understand your objection: are you suggesting to add
> > something like "Always return 0 on !SMP" to the comment? what else?
>
> Something like that, possibly along with a warning that this might not be what
> you want. You might actually want it to return true on !SMP, it depends on
> what you're using it for.
I ended up with the following revision. I hesitated on whether to refer
to 'include/linux/spinlock_up.h' or not, but in the end I decided to not
include the reference. Please let me know what you think about this.
Andrea