aboutsummaryrefslogtreecommitdiff
path: root/src/common/SimpleMutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/SimpleMutex.h')
-rw-r--r--src/common/SimpleMutex.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/SimpleMutex.h b/src/common/SimpleMutex.h
index 5d3c30cb93..84ffa1a1da 100644
--- a/src/common/SimpleMutex.h
+++ b/src/common/SimpleMutex.h
@@ -132,6 +132,13 @@ using SimpleMutex = priv::MutexOnFutex;
using SimpleMutex = priv::MutexOnStd;
#endif
+// A no-op mutex to replace SimpleMutex where a lock is not needed.
+struct NoOpMutex
+{
+ void lock() {}
+ void unlock() {}
+ bool try_lock() { return true; }
+};
} // namespace angle
#endif // COMMON_SIMPLEMUTEX_H_