This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Using __kuser_cmpxchg
- From: Paul Brook <paul at codesourcery dot com>
- To: Nicolas Pitre <nico at cam dot org>
- Cc: linux-arm-kernel at lists dot arm dot linux dot org dot uk, Andrew Haley <aph-gcc at littlepinkcloud dot com>, java at gcc dot gnu dot org
- Date: Fri, 16 Nov 2007 13:55:38 +0000
- Subject: Re: Using __kuser_cmpxchg
- References: <200711151759.lAFHxKa4027497@devserv.devel.redhat.com> <200711160025.03542.paul@codesourcery.com> <alpine.LFD.0.9999.0711152013320.21255@xanadu.home>
> > > On a pre-ARMv6 processor
> >
> > Similar "spurious" failures can happen on ARMv6 processors.
> >
> > ARMv6 cpus don't have atomic operations either. They have ldrex/strex,
> > where the latter will fail if another CPU modifies the memory *or* a
> > context switch occurs.
>
> Due to the current implementation this is indeed true.
>
> ARMv6 is more trivial to fix though, since the operation can be
> reattempted whenever the strex fails.
I'm confused. Why is this any different to ARMv5? AFAICS the two kuser_cmpxchg
implementations are functionally equivalent.
Paul