]> granicus.if.org Git - libatomic_ops/commit
Implement int CAS/inc/dec for msftc/x86_64
authorIvan Maidanski <ivmai@mail.ru>
Mon, 16 Jan 2017 21:34:48 +0000 (00:34 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 16 Jan 2017 21:34:48 +0000 (00:34 +0300)
commit8262e52fb577c634d8d93d76ec2ddecbdba1f995
tree05164f6f4598045f28e72af51ae6421881c6371f
parentaff8affc945d070b0fb5ed8540d78616535ea826
Implement int CAS/inc/dec for msftc/x86_64

* src/atomic_ops/sysdeps/msftc/x86_64.h (_InterlockedExchangeAdd):
Declare (as intrinsic) only unless AO_PREFER_GENERALIZED.
* src/atomic_ops/sysdeps/msftc/x86_64.h (_InterlockedCompareExchange):
Declare intrinsic.
* src/atomic_ops/sysdeps/msftc/x86_64.h [!AO_PREFER_GENERALIZED]
(_InterlockedIncrement, _InterlockedDecrement): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h
(AO_int_fetch_compare_and_swap_full): Define inline function (using
_InterlockedCompareExchange).
* src/atomic_ops/sysdeps/msftc/x86_64.h (AO_int_fetch_and_add_full):
Do not define if AO_PREFER_GENERALIZED.
* src/atomic_ops/sysdeps/msftc/x86_64.h [!AO_PREFER_GENERALIZED]
(AO_int_fetch_and_add1_full, AO_int_fetch_and_sub1_full): Define inline
function _InterlockedIncrement/Decrement).
src/atomic_ops/sysdeps/msftc/x86_64.h