标签: gcc atomic compare-and-swap
我目前正在调整性能,
// As i knew it does Full seq memory barrier, but I want it release order if success and relaxed order if failed while(!__sync_bool_compare_and_swap(MyData, 0, newData) ; return done;