>CPU #0CPU #1
>
>x <- load-locked(A)
>y <- load(B)
> x+1 -> store(A)
> y+1 -> store(B)
> x -> store(A)
>f(x,y) -> store-cond(A)
>
> Unless I made a mistake, the above cannot store f(x,y+1)
On 03/25/2010 06:52 PM, Jamie Lokier wrote:
I guess you are thinking to save the value loaded by load-locked,
and use it as the "old" for host cmpxchg at target's
store-conditional?
Yes.
It'll be fine when ll/sc are only used to provide single-word atomic
calculations, but I'm not sure those
Richard Henderson wrote:
> I don't see how any sort of emulation of cmpxchg/load-locked is working
> for any currently enabled nptl target. I think how I've approached
> handling load-locked for alpha is probably the easiest way. Slightly
> better would be if TCG had a (set of) cmpxchg opcodes, w
Changes from v1->v2:
* Use setcond and goto_tb.
Changes from v2->v3:
* Enable NPTL.
I don't see how any sort of emulation of cmpxchg/load-locked is working
for any currently enabled nptl target. I think how I've approached
handling load-locked for alpha is probably the easiest way. Slightly