Re: [RFC] Introduce atomic_long_t

Adrian Bunk
2005-12-09T22:02:29Z

On Fri, Dec 09, 2005 at 01:57:05PM -0800, Christoph Lameter wrote:
> On Fri, 9 Dec 2005, Adrian Bunk wrote:
>
> > What about creating an include/linux/atomic.h [1] that contains both
> > this new code and other common code like the atomic_t typedef (unless
> > there's a good reason why counter isn't volatile on h8300 and v850...).
>
> Ok that would look something like the attached patch [only exist to
> give an idea on how this would work]. It would require
>
> 1. A replacement of all #include <asm/atomic.h>s with #include
> <linux/atomic.h> throughout all files of the kernel
>
> 2. Rework of all include/asm-xx/atomic.h to extract common code.
>
> I will do just that if everyone agrees to this approach.
>...

I'd say the sequence is:
1. create an linux/atomic.h the #include's asm/atomic.h
2. convert all asm/atomic.h to use linux/atomic.h
3. move common code to linux/atomic.h

There should be a small amount of time between 2. and 3. because
doing all three steps at the same time in both Linus' tree and -mm
sounds like a hard task.