diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-03-11 07:31:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-11 07:31:16 +0100 |
commit | 05d9d1c0e727bfb5686a331b403d891da9b58ca2 (patch) | |
tree | 497e5bf12a7a4f2881d59552c3fc632f37cf93a4 /core/os/mutex.h | |
parent | cdbf0332902d34cfb3be7899fb738b5447bbb755 (diff) | |
parent | 0f78113529bdd7fc1e3b6900026521f710c066bd (diff) | |
download | redot-engine-05d9d1c0e727bfb5686a331b403d891da9b58ca2.tar.gz |
Merge pull request #36905 from Faless/js/restore_and_ci
Resurrect HTML5 platform, add it to CI (no rendering yet)
Diffstat (limited to 'core/os/mutex.h')
-rw-r--r-- | core/os/mutex.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/core/os/mutex.h b/core/os/mutex.h index 8d7b378d60..9033f0cb06 100644 --- a/core/os/mutex.h +++ b/core/os/mutex.h @@ -71,9 +71,22 @@ public: } }; +using Mutex = MutexImpl<std::recursive_mutex>; // Recursive, for general use +using BinaryMutex = MutexImpl<std::mutex>; // Non-recursive, handle with care + +extern template class MutexImpl<std::recursive_mutex>; +extern template class MutexImpl<std::mutex>; +extern template class MutexLock<MutexImpl<std::recursive_mutex> >; +extern template class MutexLock<MutexImpl<std::mutex> >; + #else -template <class StdMutexType> +class FakeMutex { + + FakeMutex(){}; +}; + +template <class MutexT> class MutexImpl { public: _ALWAYS_INLINE_ void lock() const {} @@ -87,14 +100,9 @@ public: explicit MutexLock(const MutexT &p_mutex) {} }; -#endif // !NO_THREADS - -using Mutex = MutexImpl<std::recursive_mutex>; // Recursive, for general use -using BinaryMutex = MutexImpl<std::mutex>; // Non-recursive, handle with care +using Mutex = MutexImpl<FakeMutex>; +using BinaryMutex = MutexImpl<FakeMutex>; // Non-recursive, handle with care -extern template class MutexImpl<std::recursive_mutex>; -extern template class MutexImpl<std::mutex>; -extern template class MutexLock<MutexImpl<std::recursive_mutex> >; -extern template class MutexLock<MutexImpl<std::mutex> >; +#endif // !NO_THREADS #endif |