[Gc] libatomic_ops CAS ordering constraints correspon dence to C11 atomic ones

Ivan Maidanski <ivmai-JGs/[email protected]> Thu, 24 Mar 2016 23:19:51 +0300
Newsgroups gmane.comp.programming.garbage-collection.boehmgc
Message-ID <[email protected]>
 Hello Hans,

AO Readme.txt is a bit weak in respect to CAS ordering constraints. Let's fix it by mapping to C11 atomic memory ordering (based on common sense and inspection of libatomic_ops exsiting CAS assembly implementations).

Is the following correct?
|| AO CAS suffix || C11 CAS success || C11 CAS failure ||
| -            | __ATOMIC_RELAXED | __ATOMIC_RELAXED |
| acquire | __ATOMIC_ACQUIRE  | __ATOMIC_ACQUIRE |
| release | __ATOMIC_RELEASE  | __ATOMIC_RELAXED |
| full        | __ATOMIC_SEQ_CST  | __ATOMIC_ACQUIRE |

[1] https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html
[2]  https://github.com/ivmai/libatomic_ops/blob/master/doc/README.txt  

-- 
Best regards,
Ivan

_______________________________________________
bdwgc mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/bdwgc