Internals: Make mutex classes uncopyable. (#4223)

This commit is contained in:
Mariusz Glebocki
2023-05-25 07:35:14 -04:00
committed by GitHub
parent 0ece155418
commit 8303938d0e
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -175,6 +175,7 @@ public:
/// Construct mutex (without locking it)
VerilatedMutex() = default;
~VerilatedMutex() = default;
VL_UNCOPYABLE(VerilatedMutex);
const VerilatedMutex& operator!() const { return *this; } // For -fthread_safety
/// Acquire/lock mutex
void lock() VL_ACQUIRE() VL_MT_SAFE {
+1
View File
@@ -85,6 +85,7 @@ public:
/// Construct mutex (without locking it)
V3MutexImp() = default;
~V3MutexImp() = default;
VL_UNCOPYABLE(V3MutexImp);
const V3MutexImp& operator!() const { return *this; } // For -fthread_safety
/// Acquire/lock mutex
void lock() VL_ACQUIRE() VL_MT_SAFE {