summaryrefslogtreecommitdiff
path: root/source4/heimdal
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal')
-rw-r--r--source4/heimdal/base/baselocl.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/heimdal/base/baselocl.h b/source4/heimdal/base/baselocl.h
index 3932378b2d..06806d2762 100644
--- a/source4/heimdal/base/baselocl.h
+++ b/source4/heimdal/base/baselocl.h
@@ -50,7 +50,14 @@
#include <dispatch/dispatch.h>
#endif
-#ifdef __GNUC__
+#if HEIM_BASE_NON_ATOMIC
+/* non-atomic varients */
+#define heim_base_atomic_inc(x) ++(*(x))
+#define heim_base_atomic_dec(x) --(*(x))
+#define heim_base_atomic_type unsigned int
+#define heim_base_atomic_max UINT_MAX
+
+#elif defined(__GNUC__)
#define heim_base_atomic_inc(x) __sync_add_and_fetch((x), 1)
#define heim_base_atomic_dec(x) __sync_sub_and_fetch((x), 1)
#define heim_base_atomic_type unsigned int