diff options
Diffstat (limited to 'include/my_atomic.h')
-rw-r--r-- | include/my_atomic.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/my_atomic.h b/include/my_atomic.h index c75b65db38d..2034bf48987 100644 --- a/include/my_atomic.h +++ b/include/my_atomic.h @@ -280,6 +280,12 @@ make_atomic_store(32) make_atomic_store(64) make_atomic_store(ptr) +#if SIZEOF_LONG == 4 +#define my_atomic_addlong(A,B) my_atomic_add32((int32*) (A), (B)) +#else +#define my_atomic_addlong(A,B) my_atomic_add64((int64*) (A), (B)) +#endif + #ifdef _atomic_h_cleanup_ #include _atomic_h_cleanup_ #undef _atomic_h_cleanup_ |