diff options
Diffstat (limited to 'core/os/condition_variable.h')
-rw-r--r-- | core/os/condition_variable.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/os/condition_variable.h b/core/os/condition_variable.h index 77d8fd8b8a..39106cffe1 100644 --- a/core/os/condition_variable.h +++ b/core/os/condition_variable.h @@ -34,6 +34,7 @@ #define CONDITION_VARIABLE_H #include "core/os/mutex.h" +#include "core/os/safe_binary_mutex.h" #ifdef THREADS_ENABLED @@ -58,7 +59,12 @@ class ConditionVariable { public: template <typename BinaryMutexT> _ALWAYS_INLINE_ void wait(const MutexLock<BinaryMutexT> &p_lock) const { - condition.wait(const_cast<THREADING_NAMESPACE::unique_lock<THREADING_NAMESPACE::mutex> &>(p_lock.lock)); + condition.wait(const_cast<THREADING_NAMESPACE::unique_lock<THREADING_NAMESPACE::mutex> &>(p_lock._get_lock())); + } + + template <int Tag> + _ALWAYS_INLINE_ void wait(const MutexLock<SafeBinaryMutex<Tag>> &p_lock) const { + condition.wait(const_cast<THREADING_NAMESPACE::unique_lock<THREADING_NAMESPACE::mutex> &>(p_lock.mutex._get_lock())); } _ALWAYS_INLINE_ void notify_one() const { |