summaryrefslogtreecommitdiff
path: root/include/my_atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/my_atomic.h')
-rw-r--r--include/my_atomic.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/my_atomic.h b/include/my_atomic.h
index 9a319f84451..d3e4e0055d3 100644
--- a/include/my_atomic.h
+++ b/include/my_atomic.h
@@ -36,7 +36,7 @@
#ifdef HAVE_INLINE
#define make_atomic_add(S) \
-static inline int ## S my_atomic_add ## S( \
+STATIC_INLINE int ## S my_atomic_add ## S( \
int ## S volatile *a, int ## S v) \
{ \
make_atomic_add_body(S); \
@@ -44,7 +44,7 @@ static inline int ## S my_atomic_add ## S( \
}
#define make_atomic_swap(S) \
-static inline int ## S my_atomic_swap ## S( \
+STATIC_INLINE int ## S my_atomic_swap ## S( \
int ## S volatile *a, int ## S v) \
{ \
make_atomic_swap_body(S); \
@@ -52,7 +52,7 @@ static inline int ## S my_atomic_swap ## S( \
}
#define make_atomic_cas(S) \
-static inline int my_atomic_cas ## S(int ## S volatile *a, \
+STATIC_INLINE int my_atomic_cas ## S(int ## S volatile *a, \
int ## S *cmp, int ## S set) \
{ \
int8 ret; \
@@ -61,7 +61,7 @@ static inline int my_atomic_cas ## S(int ## S volatile *a, \
}
#define make_atomic_load(S) \
-static inline int ## S my_atomic_load ## S(int ## S volatile *a) \
+STATIC_INLINE int ## S my_atomic_load ## S(int ## S volatile *a) \
{ \
int ## S ret; \
make_atomic_load_body(S); \
@@ -69,7 +69,7 @@ static inline int ## S my_atomic_load ## S(int ## S volatile *a) \
}
#define make_atomic_store(S) \
-static inline void my_atomic_store ## S( \
+STATIC_INLINE void my_atomic_store ## S( \
int ## S volatile *a, int ## S v) \
{ \
make_atomic_store_body(S); \
@@ -135,6 +135,10 @@ make_atomic_swap(ptr)
#undef _atomic_h_cleanup_
#endif
+#ifndef LF_BACKOFF
+#define LF_BACKOFF (1)
+#endif
+
#if SIZEOF_CHARP == SIZEOF_INT
typedef int intptr;
#elif SIZEOF_CHARP == SIZEOF_LONG