On 4 Nov 2013 13:14, "Mike Pall" <mike-1311@xxxxxxxxxx> wrote: > > Justin Cormack wrote: > > Does LuaJIT respect volatile semantics in terms of (not) optimising it? > > No, but that's an orthogonal issue to the original question. > > ['volatile' is rather complex to implement correctly and the weak > guarantees are pretty useless on a modern CPU. Memory barriers and > optimization barriers are conceptually much cleaner. The latter > are already implemented internally (XBAR), but there's no API to > emit them explicitly. But then ... nobody asked for those, yet.] > Yes sorry about the question hijacking that's what I thought but its been something I meant to check. Can we have an API for barriers please... Need them for hardware access and shared memory access... Justin