diff options
author | Eugene Kosov <claprix@yandex.ru> | 2017-10-09 22:55:05 +0300 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2017-10-09 23:55:05 +0400 |
commit | bbfd18c69102c2831f03f7d9dc5b67bd8556b09a (patch) | |
tree | 318f62ab3e6b323ea99a53174179c6f23f2cb846 /include/my_atomic.h | |
parent | b3027d4065538425f4a8e71fef1227ef41d10d05 (diff) | |
download | mariadb-git-bbfd18c69102c2831f03f7d9dc5b67bd8556b09a.tar.gz |
fix unsynchronized read (#463)
* fix unsynchronized read
* use relaxed atomic instead of seq_cst
Diffstat (limited to 'include/my_atomic.h')
-rw-r--r-- | include/my_atomic.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/my_atomic.h b/include/my_atomic.h index 5860426304e..bcb6005a8c2 100644 --- a/include/my_atomic.h +++ b/include/my_atomic.h @@ -235,12 +235,14 @@ make_atomic_store(ptr) #if SIZEOF_LONG == 4 #define my_atomic_addlong(A,B) my_atomic_add32((int32*) (A), (B)) #define my_atomic_loadlong(A) my_atomic_load32((int32*) (A)) +#define my_atomic_loadlong_explicit(A,O) my_atomic_load32_explicit((int32*) (A), (O)) #define my_atomic_storelong(A,B) my_atomic_store32((int32*) (A), (B)) #define my_atomic_faslong(A,B) my_atomic_fas32((int32*) (A), (B)) #define my_atomic_caslong(A,B,C) my_atomic_cas32((int32*) (A), (int32*) (B), (C)) #else #define my_atomic_addlong(A,B) my_atomic_add64((int64*) (A), (B)) #define my_atomic_loadlong(A) my_atomic_load64((int64*) (A)) +#define my_atomic_loadlong_explicit(A,O) my_atomic_load64_explicit((int64*) (A), (O)) #define my_atomic_storelong(A,B) my_atomic_store64((int64*) (A), (B)) #define my_atomic_faslong(A,B) my_atomic_fas64((int64*) (A), (B)) #define my_atomic_caslong(A,B,C) my_atomic_cas64((int64*) (A), (int64*) (B), (C)) |