mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Internals: Make mutex classes uncopyable. (#4223)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user