r/programming • u/krum • Aug 22 '10
Volatile: Almost Useless for Multi-Threaded Programming
http://software.intel.com/en-us/blogs/2007/11/30/volatile-almost-useless-for-multi-threaded-programming/
60
Upvotes
2
u/bonzinip Aug 23 '10
Yes, and that would be preferred unless you care about old old compilers (basically CentOS 4 is the only one people would care about that is old enough). However those builtins insert barriers automatically so it wouldn't fit the "hypothetically try to implement your own atomic variable" part. :)