Messages in this thread | | | Subject | Re: [PATCH] [2.5] include/asm-generic/bitops.h {set,clear}_bit return void | From | Robert Love <> | Date | 15 Apr 2003 17:34:49 -0400 |
| |
On Tue, 2003-04-15 at 17:27, Carl-Daniel Hailfinger wrote:
> What is the preferred way to achieve atomicity in an operation now that > cli() and sti() are gone?
spin locks.
> The point of asm-generic is not to use the files, but to give porters a > hint about the functionality. Quoting asm-generic/bitops.h: > > /* For the benefit of those who are trying to port Linux to another > * architecture, here are some C-language equivalents. You should > * recode these in the native assembly language, if at all possible. > * To guarantee atomicity, these routines call cli() and sti() to > * disable interrupts while they operate. (You have to provide inline > * routines to cli() and sti().) */ > > Or is this comment wrong, too?
Well, the cli() and sti() part is definitely wrong for 2.5.
It is wrong though to assume that nothing will use these; someone may copy them directly (and then they do not work) or someone may #include this file.
I like Arnd's suggestion to just remove these functions and all other instances of them -- assuming in fact they are never used.
Robert Love
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |