apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: Atomic operations
Date Sun, 10 Feb 2002 20:07:41 GMT
On Sun, Feb 10, 2002 at 09:16:30AM -0800, Ian Holsman wrote:
> hi.
> I would really like to get atomic operations into the APR.
> having atomic_add would allow nifty things like virtual-host stats,
> and reference counting (among others)
> I've noticed that linux supports them out of the box via
> atomic_add in <asm/atomic.h>
> NT has there version in Interlock...
> GCC v3 also has gcc-3.0/include/g++-v3/sparcv9-sun-solaris2.8/bits
> for solaris, so I'm assuming that everywhere GCC v3 has been ported it 
> will be available.
> I remember the FreeBSD has something similiar
> so that leaves the others, which I'm sure have somthing like this.
> the alternative for non-native atomic support is a mutex or
> specifcying a --disable-smp on the command line for configure which
> will disable the mutex on single CPU boxes.
> what do you think guys??

I think this is going to screw us with respect to target/compiler/OS
combinations.  AFAIK, Linux's ASM kernel constructs works only with
gcc.  Assembler blocks are going to be dependent on the machine type,
the compiler, and the operating system.

I'd wish we could do this within ANSI C, but I know that we can't.

I won't stand in your way, but I'll cast -0 as there is no way
I'm helping out.  This will get real messy real fast.  -- justin

View raw message