[linux-audio-dev] userspace atomic primitives for multithread and SMP applications?
Ingo Oeser
ingo.oeser at informatik.tu-chemnitz.de
Tue Aug 19 10:38:01 UTC 2003
Hi Jack,
On Sun, Aug 17, 2003 at 12:56:09PM -0500, Jack O'Quin wrote:
> All I've found so far are...
>
> (*) kernel implementations of <asm/atomic.h> and <asm/system.h>.
Don't use these, if glibc supports your architecture.
> But, I prefer to avoid using kernel header files in application
> code, mostly for portability and maintenance reasons.
> Distributions handle them in non-standard ways, making it hard
> to explain to users how to resolve the dependency. Also,
> porting to non-Linux platforms becomes problematic.
And as there might be privilegded operations involved, these
headers are a big no-no.
> (*) glibc seems to have a good set of functions internally
>
> AFAICT, these are for the library's own use, not part of the
> supported external interface. I'll investigate further.
These I use myself and I can recommend them, as long as you use
GCC or a compatible compiler. They are mad for user space and
survive even preemption quite well.
Regards
Ingo Oeser
More information about the Linux-audio-dev
mailing list