summaryrefslogtreecommitdiff
path: root/runtime/atomic.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2014-08-18 17:48:20 +0200
committerMichael Biebl <biebl@debian.org>2014-08-18 17:48:20 +0200
commit1dfcd909d90f6fad4a612b6fd998d7473a9da399 (patch)
treeb9fb75cfd347088f1850b48e298c5db564304ece /runtime/atomic.h
parentdaeb0d03d4a65fa118ad25b34958fb9cacbbd6f4 (diff)
downloadrsyslog-e86b4e5572959e0c68e5b6218caf18a53b9d1989.tar.gz
Imported Upstream version 8.4.0upstream/8.4.0
Diffstat (limited to 'runtime/atomic.h')
-rw-r--r--runtime/atomic.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/atomic.h b/runtime/atomic.h
index 2a89558..49c17d8 100644
--- a/runtime/atomic.h
+++ b/runtime/atomic.h
@@ -181,18 +181,18 @@
(*data) -= val;
pthread_mutex_unlock(phlpmut);
}
-# define DEF_ATOMIC_HELPER_MUT(x) pthread_mutex_t x
-# define INIT_ATOMIC_HELPER_MUT(x) pthread_mutex_init(&(x), NULL)
-# define DESTROY_ATOMIC_HELPER_MUT(x) pthread_mutex_destroy(&(x))
+# define DEF_ATOMIC_HELPER_MUT(x) pthread_mutex_t x;
+# define INIT_ATOMIC_HELPER_MUT(x) pthread_mutex_init(&(x), NULL);
+# define DESTROY_ATOMIC_HELPER_MUT(x) pthread_mutex_destroy(&(x));
# define PREFER_ATOMIC_INC(data) ((void) ++data)
#endif
/* we need to handle 64bit atomics seperately as some platforms have
- * 32 bit atomics, but not 64 biot ones... -- rgerhards, 2010-12-01
+ * 32 bit atomics, but not 64 bit ones... -- rgerhards, 2010-12-01
*/
-#ifdef HAVE_ATOMIC_BUILTINS_64BIT
+#ifdef HAVE_ATOMIC_BUILTINS64
# define ATOMIC_INC_uint64(data, phlpmut) ((void) __sync_fetch_and_add(data, 1))
# define ATOMIC_DEC_unit64(data, phlpmut) ((void) __sync_sub_and_fetch(data, 1))
# define ATOMIC_INC_AND_FETCH_uint64(data, phlpmut) __sync_fetch_and_add(data, 1)
@@ -224,6 +224,6 @@
# define DEF_ATOMIC_HELPER_MUT64(x) pthread_mutex_t x
# define INIT_ATOMIC_HELPER_MUT64(x) pthread_mutex_init(&(x), NULL)
# define DESTROY_ATOMIC_HELPER_MUT64(x) pthread_mutex_destroy(&(x))
-#endif /* #ifdef HAVE_ATOMIC_BUILTINS_64BIT */
+#endif /* #ifdef HAVE_ATOMIC_BUILTINS64 */
#endif /* #ifndef INCLUDED_ATOMIC_H */