Using __kuser_cmpxchg
Nicolas Pitre
nico@cam.org
Thu Nov 15 18:28:00 GMT 2007
On Thu, 15 Nov 2007, Andrew Haley wrote:
> Andrew Haley writes:
> > Paul Brook writes:
> > > For recent kernels there is a kernel helper you should use.
> > > See __kernel_cmpxchg in linux/arch/arm/kernel/entry-armv.S
> > >
> > > Any kernel capable of running on armv6/v7 hardware should have this helper.
> > > So should all targets on targets that define __ARM_EABI__
> > >
> > > So I suggest using the kernel helper for EABI and v6/v7 libraries, everyone
> > > else will have to make do with the crappy old sequence.
> >
> > OK, I'll investigate this as soon as I get some time.
>
> It seems to be impossible to use this kernel helper because
>
> * - A failure might be transient, i.e. it is possible, although unlikely,
> * that "failure" be returned even if *ptr == oldval.
>
> If this were to happen, the logic used to block and unblock threads
> wouldn't work.
Why?
Nicolas
More information about the Java
mailing list