Mercurial > hg > Papers > 2021 > soto-thesis
comparison paper/src/atomicImpl.cbc @ 3:959f4b34d6f4
add final thesis
author | soto |
---|---|
date | Tue, 09 Feb 2021 18:44:53 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2:2c50fd1d115e | 3:959f4b34d6f4 |
---|---|
1 __code checkAndSetAtomicReference(struct AtomicReference* atomic, union Data** ptr, union Data* oldData, union Data* newData, __code next(...), __code fail(...)) { | |
2 if (__sync_bool_compare_and_swap(ptr, oldData, newData)) { | |
3 goto next(...); | |
4 } | |
5 goto fail(...); | |
6 } |