Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 58221 invoked by uid 500); 22 Apr 2002 22:23:10 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 58209 invoked from network); 22 Apr 2002 22:23:09 -0000 Date: Mon, 22 Apr 2002 23:16:53 +0100 From: Thom May To: Justin Erenkrantz , dev@apr.apache.org Subject: Re: [PATCH] Use handcoded assembly on Linux for atomics Message-ID: <20020422221653.GG386@eustasy> References: <20020422014201.F26655@apache.org> <20020422093226.GD386@eustasy> <20020422102953.GF386@eustasy> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020422102953.GF386@eustasy> User-Agent: Mutt/1.3.28i X-Operating-System: Linux/2.4.19-pre6 (i686) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N * 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