apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garrett Rooney" <roo...@electricjellyfish.net>
Subject Re: [PATCH] apr_atomic_cas broken in 0.9.x
Date Mon, 25 Sep 2006 16:34:06 GMT
On 9/24/06, Philip Martin <philip@codematters.co.uk> wrote:
> Philip Martin <philip@codematters.co.uk> writes:
>
> > Port some of the atomic code from 1.2.x to 0.9.x, in particular make
> > mutex operations that fail cause an abort and make the generic C
> > implementation of apr_atomic_cas work on 64 bit platforms.
>
> A less radical change to the code is simply to truncate the 64 bit
> values and rely on the application not to need those bits.  This
> should be enough to fix Subversion which only uses small +ve integers.
>
> * atomic/unix/apr_atomic.c (apr_atomic_cas): Truncate 64 bit argument
>   values.

I committed this version of the change in r449724, since it's
certainly an improvement over what was there before, and smaller
changes for the 0.9.x branch seem more desireable.  I don't actually
have a 64 bit platform to test on, so if someone who does can confirm
that it helps that would be great, but it sure looks like it should
correct the problem, and if I turn off the linux-specific atomics
implementation here it seems to work fine, so it's certainly not a
step backwards.

-garrett

Mime
View raw message