> however, atomic.h is a *kernel header*, and linus has made it very
> clear that no user space program should ever include these headers.
>
> the solution is quite simple (and the one he advocates): copy the
> contents of the header file to a new location and use that. most of my
> code includes
>#ifdef __KERNEL__
>
>#define ATOMIC_INIT(i) { (i) }
>
>#define atomic_read(v) ((v)->counter)
>#define atomic_set(v,i) (((v)->counter) = (i))
>
>
>etc.
>
>Not using atomic reads where they are necessary would seem like a bad
>idea. Are the ones in pcm_meter (and maybe they are u
I just tried to compile alsa-lib from CVS, and it gave me errors. It
seems that atomic_read and friends are only available for kernel
processes, not for userland. At least that's the way it is on PPC:
#ifdef __KERNEL__
#define ATOMIC_INIT(i) { (i) }
#define atomic_read(v) ((v)->coun