Internals: Make mutex classes uncopyable. (#4223)
This commit is contained in:
parent
0ece155418
commit
8303938d0e
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue