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:
authorStefan Werner <stefan.werner@tangent-animation.com>2019-09-30 09:28:56 +0300
committerStefan Werner <stefan.werner@tangent-animation.com>2019-09-30 09:29:17 +0300
commit04133ee863b43d1a595ce049685c6a2347ffd3ad (patch)
tree7d2501744d38684c980a1d47d6a9d332a5ae2d3e /intern/cycles/util/util_thread.h
parent64c222ff58577b80994a11fa63c137b89a3083fc (diff)
Revert "macOS: Replaced OSSpinLock with os_unfair_lock."
This reverts commit 9d282d7a8d689a17ae58e94453ae99a41e91b701. os_unfair_lock requires macOS 10.12 or newer.
Diffstat (limited to 'intern/cycles/util/util_thread.h')
-rw-r--r--intern/cycles/util/util_thread.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/cycles/util/util_thread.h b/intern/cycles/util/util_thread.h
index a9cfc309e0d..18ec5b32144 100644
--- a/intern/cycles/util/util_thread.h
+++ b/intern/cycles/util/util_thread.h
@@ -30,7 +30,7 @@
#endif
#ifdef __APPLE__
-# include <os/lock.h>
+# include <libkern/OSAtomic.h>
#endif
#include "util/util_function.h"
@@ -72,17 +72,17 @@ class thread_spin_lock {
#ifdef __APPLE__
inline thread_spin_lock()
{
- spin_ = OS_UNFAIR_LOCK_INIT;
+ spin_ = OS_SPINLOCK_INIT;
}
inline void lock()
{
- os_unfair_lock_lock(&spin_);
+ OSSpinLockLock(&spin_);
}
inline void unlock()
{
- os_unfair_lock_unlock(&spin_);
+ OSSpinLockUnlock(&spin_);
}
#elif defined(_WIN32)
inline thread_spin_lock()
@@ -128,7 +128,7 @@ class thread_spin_lock {
#endif
protected:
#ifdef __APPLE__
- os_unfair_lock spin_;
+ OSSpinLock spin_;
#elif defined(_WIN32)
CRITICAL_SECTION cs_;
#else