summaryrefslogtreecommitdiff
path: root/thirdparty/embree-aarch64/common/sys/condition.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/embree-aarch64/common/sys/condition.h')
-rw-r--r--thirdparty/embree-aarch64/common/sys/condition.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/thirdparty/embree-aarch64/common/sys/condition.h b/thirdparty/embree-aarch64/common/sys/condition.h
new file mode 100644
index 0000000000..7a3a05aa81
--- /dev/null
+++ b/thirdparty/embree-aarch64/common/sys/condition.h
@@ -0,0 +1,31 @@
+// Copyright 2009-2020 Intel Corporation
+// SPDX-License-Identifier: Apache-2.0
+
+#pragma once
+
+#include "mutex.h"
+
+namespace embree
+{
+ class ConditionSys
+ {
+ public:
+ ConditionSys();
+ ~ConditionSys();
+ void wait( class MutexSys& mutex );
+ void notify_all();
+
+ template<typename Predicate>
+ __forceinline void wait( class MutexSys& mutex, const Predicate& pred )
+ {
+ while (!pred()) wait(mutex);
+ }
+
+ private:
+ ConditionSys (const ConditionSys& other) DELETED; // do not implement
+ ConditionSys& operator= (const ConditionSys& other) DELETED; // do not implement
+
+ protected:
+ void* cond;
+ };
+}