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: Tim Hockin (thockin_AT_hockin.org)
Date: Mon Aug 18 2003 - 23:28:24 EEST


On Sun, Aug 17, 2003 at 12:56:09PM -0500, Jack O'Quin wrote:
>
> I am looking for a good set of portable, supported atomic.h-style
> primitives for userspace applications. I am not especially interested
> in the low-level functions defined in <asm/atomic.h>. I really want
> something more powerful like the kernel's compare_and_swap(),
> cmpxchg(), test_and_set(), atomic_inc_and_return(), or fetch_and_add()

These are intrinsically platform specific.

> (*) 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.

It sure would be nice if glibc exposed an atomic API. I dunno how much you
can do as a user, though. Can non-privileged tasks run LOCKed instructions
on x86? How about other architectures?

-- 
Notice that as computers are becoming easier and easier to use,
suddenly there's a big market for "Dummies" books.  Cause and effect,
or merely an ironic juxtaposition of unrelated facts?


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 - 00:10:18 EEST