diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-11-23 23:17:16 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-11-23 23:17:16 +0300 |
commit | cf6e8edda5e51696a20c76b879d920655d65e81d (patch) | |
tree | 433bb34b5ad8d726291a333d796211d69d65b10f /intern/atomic/atomic_ops.h | |
parent | efb86b712d540e132fb68058b7a7fba0fc8be247 (diff) |
atomic_ops: add `atomic_cas_float` helper.
Diffstat (limited to 'intern/atomic/atomic_ops.h')
-rw-r--r-- | intern/atomic/atomic_ops.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/atomic/atomic_ops.h b/intern/atomic/atomic_ops.h index 578cfb76eb6..e849bcf6cef 100644 --- a/intern/atomic/atomic_ops.h +++ b/intern/atomic/atomic_ops.h @@ -130,6 +130,9 @@ ATOMIC_INLINE unsigned int atomic_cas_u(unsigned int *v, unsigned int old, unsig ATOMIC_INLINE void *atomic_cas_ptr(void **v, void *old, void *_new); + +ATOMIC_INLINE float atomic_cas_float(float *v, float old, float _new); + /* WARNING! Float 'atomics' are really faked ones, those are actually closer to some kind of spinlock-sync'ed operation, * which means they are only efficient if collisions are highly unlikely (i.e. if probability of two threads * working on the same pointer at the same time is very low). */ |