Add support for atomic swap/cmpexchg with float and double types.

Addresses issue #60.
This commit is contained in:
Matt Pharr
2011-07-07 14:07:52 +01:00
parent 729f522a01
commit aef8c09019
3 changed files with 49 additions and 2 deletions

View File

@@ -1852,7 +1852,8 @@ example.
Here are the declarations of the ``int32`` variants of these functions.
There are also ``int64`` equivalents as well as variants that take
``unsigned`` ``int32`` and ``int64`` values.
``unsigned`` ``int32`` and ``int64`` values. (The ``atomic_swap_global()``
function can be used with ``float`` and ``double`` types as well.)
::
@@ -1869,7 +1870,8 @@ There is also an atomic "compare and exchange" function; it atomically
compares the value in "val" to "compare"--if they match, it assigns
"newval" to "val". In either case, the old value of "val" is returned.
(As with the other atomic operations, there are also ``unsigned`` and
64-bit variants of this function.)
64-bit variants of this function. Furthermore, there are ``float`` and
``double`` variants as well.)
::