Subj : Re: Memory visibility and MS Interlocked instructions To : comp.programming.threads From : Sean Kelly Date : Mon Sep 05 2005 11:00 am Sean Kelly wrote: > > A load/store combination would definately work, but if CMPXCHG would > work as well then so much the better. Is a separate load even > necessary then? Assuming *addr != 42 then we've essentially loaded > addr twice in a row. I just checked the docs on CMPXCHG and it seems like you're right--a load and a store always occur with CMPXCHG. It seems like it should definately be sufficient to replace loads with CMPXCHG where SC is desired. Hopefully, Andy Glew will confirm this. I've been keeping an eye on the thread in comp.arch as well. Sean .