On Sat, Feb 2, 2013 at 5:10 PM, Jeffrey Walton <noloa...@gmail.com> wrote: > Thanks Andrew. > > So, it looks like I don't understand sequence points. Please forgive > my ignorance. > > What does C/C++ and GCC offer to ensure writes are complete before > reads are performed on a value in a multi-threaded program?
GCC offers some builtins which start with __atomic_* (older versions of GCC [4.2.x-4.6.x] only offer __sync_* builtins functions). C++11 offers some atomic functions too (which in turn calls the __atomic_* functions). I don't remember if C11 offers those similar functions or not. Thanks, Andrew Pinski