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
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
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.