Re: [Alsa-devel] atomic_read in alsa-lib

2001-12-06 Thread Jack Moffitt
> 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

Re: [Alsa-devel] atomic_read in alsa-lib

2001-12-06 Thread Paul Davis
>#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

[Alsa-devel] atomic_read in alsa-lib

2001-12-06 Thread Jack Moffitt
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