mirror of
https://github.com/verilator/verilator.git
synced 2025-01-06 06:37:45 +00:00
Internals: Rename. No functional change.
This commit is contained in:
parent
9d7f5bdc26
commit
4a10c9ef6f
@ -3246,11 +3246,11 @@ void VlDeleter::deleteAll() VL_EXCLUDES(m_mutex) VL_EXCLUDES(m_deleteMutex) VL_M
|
|||||||
VerilatedLockGuard lock{m_mutex};
|
VerilatedLockGuard lock{m_mutex};
|
||||||
if (m_newGarbage.empty()) break;
|
if (m_newGarbage.empty()) break;
|
||||||
m_deleteMutex.lock();
|
m_deleteMutex.lock();
|
||||||
std::swap(m_newGarbage, m_toDelete);
|
std::swap(m_newGarbage, m_deleteNow);
|
||||||
// m_mutex is unlocked here, so destructors can enqueue new objects
|
// m_mutex is unlocked here, so destructors can enqueue new objects
|
||||||
}
|
}
|
||||||
for (VlDeletable* const objp : m_toDelete) delete objp;
|
for (VlDeletable* const objp : m_deleteNow) delete objp;
|
||||||
m_toDelete.clear();
|
m_deleteNow.clear();
|
||||||
m_deleteMutex.unlock();
|
m_deleteMutex.unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1499,7 +1499,7 @@ class VlDeleter final {
|
|||||||
// Queue of new objects that should be deleted
|
// Queue of new objects that should be deleted
|
||||||
std::vector<VlDeletable*> m_newGarbage VL_GUARDED_BY(m_mutex);
|
std::vector<VlDeletable*> m_newGarbage VL_GUARDED_BY(m_mutex);
|
||||||
// Queue of objects currently being deleted (only for deleteAll())
|
// Queue of objects currently being deleted (only for deleteAll())
|
||||||
std::vector<VlDeletable*> m_toDelete VL_GUARDED_BY(m_deleteMutex);
|
std::vector<VlDeletable*> m_deleteNow VL_GUARDED_BY(m_deleteMutex);
|
||||||
mutable VerilatedMutex m_mutex; // Mutex protecting the 'new garbage' queue
|
mutable VerilatedMutex m_mutex; // Mutex protecting the 'new garbage' queue
|
||||||
mutable VerilatedMutex m_deleteMutex; // Mutex protecting the delete queue
|
mutable VerilatedMutex m_deleteMutex; // Mutex protecting the delete queue
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user