apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thom May <t...@planetarytramp.net>
Subject Re: [PATCH] Use handcoded assembly on Linux for atomics
Date Mon, 22 Apr 2002 22:16:53 GMT
* Thom May (thom@planetarytramp.net) wrote :
> * Thom May (thom@planetarytramp.net) wrote :
> > * Justin Erenkrantz (jerenkrantz@apache.org) wrote :
> > > I *really* need help testing this.  Create atomic/linux/Makefile.in
> > > atomic/linux/apr_atomic_linux.c from the fragments below and and
> > > apply these patches.
> > [...]
> > > 
> > > I tried to keep the general idea of the code as close as I could to
> > > the original FreeBSD code, but I did make a bunch of formatting
> > > changes and attempted to verify the code as much as I could (well,
> > > I didn't pay much attention to Alpha's ASM).
> > > 
> > > Since I don't have access to a Linux/Alpha or Linux/Sparc box, I
> > > don't know what the right processor #define would be - so I took
> > > a guess.

so, __SPARC__ wants to be __sparc__, and __ALPHA__ wants to be __alpha__
but, on the sparc I'm able to play with:
(unstable)thom@vore:~/apr$ uname -a 
Linux vore 2.4.18 #1 Tue Mar 5 00:19:51 EST 2002 sparc64 unknown
(unstable)thom@vore:~/apr$ cat /proc/cpuinfo 
cpu             : TI UltraSparc II  (BlackBird)
fpu             : UltraSparc II integrated FPU
promlib         : Version 3 Revision 27
prom            : 3.27.0
type            : sun4u
ncpus probed    : 1
ncpus active    : 1
Cpu0Bogo        : 591.46
Cpu0ClkTck      : 0000000011a48e76
MMU Type        : Spitfire

build dies with:
apr_atomic_linux.c:321: macro `atomic_cas' used with too many (4) args
apr_atomic_linux.c:328: macro `atomic_cas' used with too many (5) args
In file included from apr_atomic_linux.c:339:
../unix/apr_atomic.c:86: macro `atomic_op' used with too many (5) args
../unix/apr_atomic.c:122: macro `atomic_op' used with too many (5) args

It also appears that both archs have APR_ATOMIC_NEED_DEFAULT set from
somewhere, also.
Cheers,
-Thom

Mime
View raw message