I'm abandoning this for now. It's occurred to me that the solution could look very different after weak cmpxchg is implemented. Wish I'd thought of that before I spent a couple of days working on this approach. Oh well. Tim. http://reviews.llvm.org/D4083