summaryrefslogtreecommitdiff
path: root/include/my_atomic.h
diff options
context:
space:
mode:
authorunknown <guilhem@gbichot4.local>2008-02-20 16:58:43 +0100
committerunknown <guilhem@gbichot4.local>2008-02-20 16:58:43 +0100
commit788b95bc72bd6fee45b553960193a30accbc75ac (patch)
treec3564a8b4ed123272dcf8c999b2d2a566ebc1929 /include/my_atomic.h
parenteeb2ec1691b2e0cd2e44bef17598556e236ac469 (diff)
downloadmariadb-git-788b95bc72bd6fee45b553960193a30accbc75ac.tar.gz
Fixes for bugs (my_atomic and Maria log handler) observed on
Solaris 10 Sparc 64bit. include/my_atomic.h: Prototypes in the non-inline (extern) case were wrong: they were missing "U_a" i.e. "volatile *". Caused a segfault in my_atomic-t on Solaris10 Sparc 64. storage/maria/ma_loghandler.c: Move "buffer" array up in the struct, to get it aligned on long-boundary so that page cache can use bmove512() (it was not aligned and bmove512() was used, causing SIGBUS on Solaris10 Sparc 64). storage/maria/unittest/ma_pagecache_consist.c: doing *(uint*)(charbuff)=something is not ok on sparc machines, we must use int4store/uint4korr. Fixes a SIGBUS on Solaris10 Sparc 64.
Diffstat (limited to 'include/my_atomic.h')
-rw-r--r--include/my_atomic.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/my_atomic.h b/include/my_atomic.h
index 5579a98b510..40d762f8ff0 100644
--- a/include/my_atomic.h
+++ b/include/my_atomic.h
@@ -184,19 +184,19 @@ STATIC_INLINE void my_atomic_store ## S( \
#else /* no inline functions */
#define make_atomic_add(S) \
-extern int ## S my_atomic_add ## S(Uv_ ## S, U_ ## S);
+extern int ## S my_atomic_add ## S(Uv_ ## S U_a, U_ ## S U_v);
#define make_atomic_fas(S) \
-extern int ## S my_atomic_fas ## S(Uv_ ## S, U_ ## S);
+extern int ## S my_atomic_fas ## S(Uv_ ## S U_a, U_ ## S U_v);
#define make_atomic_cas(S) \
-extern int my_atomic_cas ## S(Uv_ ## S, Uv_ ## S, U_ ## S);
+extern int my_atomic_cas ## S(Uv_ ## S U_a, Uv_ ## S U_cmp, U_ ## S U_set);
#define make_atomic_load(S) \
-extern int ## S my_atomic_load ## S(Uv_ ## S);
+extern int ## S my_atomic_load ## S(Uv_ ## S U_a);
#define make_atomic_store(S) \
-extern void my_atomic_store ## S(Uv_ ## S, U_ ## S);
+extern void my_atomic_store ## S(Uv_ ## S U_a, U_ ## S U_v);
#endif