summaryrefslogtreecommitdiff
path: root/thirdparty/embree/common/sys/mutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/embree/common/sys/mutex.h')
-rw-r--r--thirdparty/embree/common/sys/mutex.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/thirdparty/embree/common/sys/mutex.h b/thirdparty/embree/common/sys/mutex.h
index 4cb3626d92..26af6c582c 100644
--- a/thirdparty/embree/common/sys/mutex.h
+++ b/thirdparty/embree/common/sys/mutex.h
@@ -7,6 +7,7 @@
#include "intrinsics.h"
#include "atomic.h"
+#define CPU_CACHELINE_SIZE 64
namespace embree
{
/*! system mutex */
@@ -83,6 +84,11 @@ namespace embree
atomic<bool> flag;
};
+ class PaddedSpinLock : public SpinLock
+ {
+ private:
+ char padding[CPU_CACHELINE_SIZE - sizeof(SpinLock)];
+ };
/*! safe mutex lock and unlock helper */
template<typename Mutex> class Lock {
public: