Re: [linux-audio-dev] userspace atomic primitives for multithread and SMP applications?

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] userspace atomic primitives for multithread and SMP applications?
From: Ingo Oeser (ingo.oeser_AT_informatik.tu-chemnitz.de)
Date: Tue Aug 19 2003 - 16:01:38 EEST


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


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Aug 19 2003 - 17:23:43 EEST