<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 23, 2009, at 9:41 PM, Xi Wang wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>There is no __sync_synchronize or __sync_val_compare_and_swap on Mac<br>OS X.  One might use OSMemoryBarrier or OSAtomicCompareAndSwap32<br>instead.  The patch is attached.<br></div></blockquote></div><br><div>Actually, __sync_synchronize and __sync_val_compare_and_swap DO exist on Darwin, but only if you use Apple's GCC 4.2 (or later), just as it is on Linux.  We always want to use these intrinsic versions if possible, because they're much lower overhead.</div><div><br></div><div>The policy Chris has proposed is that we simply do not support multithreaded LLVM with a host compiler pre-GCC 4.2.  If you need multithreaded LLVM on an unsupported platform, you can build a single threaded LLVM and LLVM-GCC, and then use <i>that</i> to build a multithreaded LLVM.</div><div><br></div><div>--Owen</div></body></html>