summaryrefslogtreecommitdiffhomepage
path: root/compat/mutex.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-12-20 18:30:37 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-12-24 19:31:24 +0100
commitea29ea8095e1fe6e7c1766f87aea33650a1a485d (patch)
treeb6a908b371b7139d4f58be814f1de44807bb5f98 /compat/mutex.cpp
parent0fbca6ba484194a9c16c43bc93d70590702c0a99 (diff)
compat/mutex: rename
Diffstat (limited to 'compat/mutex.cpp')
-rw-r--r--compat/mutex.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/compat/mutex.cpp b/compat/mutex.cpp
new file mode 100644
index 00000000..55789a22
--- /dev/null
+++ b/compat/mutex.cpp
@@ -0,0 +1,33 @@
+#include "mutex.hpp"
+#include <cstdlib>
+
+mutex& mutex::operator=(const mutex& rhs)
+{
+ if (rhs->isRecursive() != inner.isRecursive())
+ std::abort();
+
+ return *this;
+}
+
+mutex::mutex(const mutex& datum) : mutex{datum.inner.isRecursive() ? Recursive : NonRecursive}
+{
+}
+
+mutex::mutex(RecursionMode m) : inner{m}
+{
+}
+
+QMutex* mutex::operator&() const
+{
+ return *this;
+}
+
+mutex::operator QMutex*() const
+{
+ return &inner;
+}
+
+QMutex* mutex::operator->() const
+{
+ return *this;
+}