diff --git a/include/verilated.h b/include/verilated.h index a66472266..4ee19b681 100644 --- a/include/verilated.h +++ b/include/verilated.h @@ -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 { diff --git a/src/V3Mutex.h b/src/V3Mutex.h index 2d9e99eda..c5f3883a7 100644 --- a/src/V3Mutex.h +++ b/src/V3Mutex.h @@ -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 {