Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-08-19 14:53:10 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-08-19 14:53:10 +0400
commit499ccf731bc130fbd9f9900b021eafd6399cc4c0 (patch)
tree4a02905d7a5ae05aa3666db85ad2eb127cbd6710 /intern/atomic
parentc0f8e15295371ae69b38185d3ee5659cdd1af386 (diff)
Forgot this in previous commit
Solves compilation issues on Win and OSX -- svn merge -r59180:59181 ^/branches/soc-2013-depsgraph_mt
Diffstat (limited to 'intern/atomic')
-rw-r--r--intern/atomic/atomic_ops.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/intern/atomic/atomic_ops.h b/intern/atomic/atomic_ops.h
index 7baa5f6ecac..0df5e0c4cb1 100644
--- a/intern/atomic/atomic_ops.h
+++ b/intern/atomic/atomic_ops.h
@@ -29,6 +29,12 @@
#ifndef ATOMIC_OPS_H__
#define ATOMIC_OPS_H__
+#if defined (__APPLE__)
+# include <libkern/OSAtomic.h>
+#elif defined(_MSC_VER)
+# include <windows.h>
+#endif
+
/* needed for int types */
#include "../../source/blender/blenlib/BLI_sys_types.h"
@@ -44,8 +50,7 @@
# endif
#endif
-/* TODO(sergey): check on other 64bit platforms. */
-#if defined(_M_X64) || defined(_M_AMD64) || defined(__amd64__) || defined(__x86_64__)
+#if defined(_M_X64) || defined(__amd64__) || defined(__x86_64__)
# define LG_SIZEOF_PTR 3
# define LG_SIZEOF_INT 3
#else
@@ -80,7 +85,7 @@ atomic_sub_uint64(uint64_t *p, uint64_t x)
{
return (InterlockedExchangeAdd64(p, -((int64_t)x)));
}
-#elif (defined(JEMALLOC_OSATOMIC))
+#elif (defined(__APPLE__))
ATOMIC_INLINE uint64_t
atomic_add_uint64(uint64_t *p, uint64_t x)
{
@@ -178,7 +183,7 @@ atomic_sub_uint32(uint32_t *p, uint32_t x)
{
return (InterlockedExchangeAdd(p, -((int32_t)x)));
}
-#elif (defined(JEMALLOC_OSATOMIC))
+#elif (defined(__APPLE__))
ATOMIC_INLINE uint32_t
atomic_add_uint32(uint32_t *p, uint32_t x)
{