[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0710272227580.30465@fbirervta.pbzchgretzou.qr>
Date: Sat, 27 Oct 2007 22:32:04 +0200 (CEST)
From: Jan Engelhardt <jengelh@...putergmbh.de>
To: Alexey Dobriyan <adobriyan@...il.com>
cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] irq_flags_t: intro and core annotations
On Oct 28 2007 00:24, Alexey Dobriyan wrote:
>
>> (Which would be the logical choice if it were a function and not a
>> macro...) That would flag up all violations ("without cast to different
>> pointer" or so) while usually not breaking compilation.
>>
>> Of course, irq_flags_t is probably the best long-term solution if one
>> wants to hide a struct. (Even then perhaps, use a pointer instead?)
>
>IIRC, Christoph mentioned:
>
> irq_flags_t flags;
>
> flags = spin_lock_irqXXX(&lock);
> spin_unlock_irqYYY(&lock, flags);
>
>where XXX and YYY are still to be found good names :^) It's also a solution
>without flag day and with more sane lock part -- "how flags are modified
>if they are passed by value?"
>
>I start to like this proposal but I can't come up with good names.
>
The BSD way: just add a number -- spin_lock_irq2()
Of course names are preferable.
irq_spin_lock and irq_spin_unlock?
spinirq_lock, spinirq_unlock?
spin_lock_irq_disable, spin_lock_irq_enable (a bit verbose...)
Maybe the 'irq' part should be completely dropped from the name,
as with -rt extensions, it behaves differently, does not it?
(Or was it preemption?)
If it was a home project, I'd just flag it, if it was a business project,
I'd add the number, for Linux - ha, too big for me :-)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists