From 4a10c9ef6f31de71c1568dfb3ae8b7694dd64fe1 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 11 Nov 2023 20:47:10 -0500 Subject: [PATCH] Internals: Rename. No functional change. --- include/verilated.cpp | 6 +++--- include/verilated_types.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/verilated.cpp b/include/verilated.cpp index 07832c3c3..cbe46edb6 100644 --- a/include/verilated.cpp +++ b/include/verilated.cpp @@ -3246,11 +3246,11 @@ void VlDeleter::deleteAll() VL_EXCLUDES(m_mutex) VL_EXCLUDES(m_deleteMutex) VL_M VerilatedLockGuard lock{m_mutex}; if (m_newGarbage.empty()) break; 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 } - for (VlDeletable* const objp : m_toDelete) delete objp; - m_toDelete.clear(); + for (VlDeletable* const objp : m_deleteNow) delete objp; + m_deleteNow.clear(); m_deleteMutex.unlock(); } } diff --git a/include/verilated_types.h b/include/verilated_types.h index be2914d70..512b1c9c3 100644 --- a/include/verilated_types.h +++ b/include/verilated_types.h @@ -1499,7 +1499,7 @@ class VlDeleter final { // Queue of new objects that should be deleted std::vector m_newGarbage VL_GUARDED_BY(m_mutex); // Queue of objects currently being deleted (only for deleteAll()) - std::vector m_toDelete VL_GUARDED_BY(m_deleteMutex); + std::vector m_deleteNow VL_GUARDED_BY(m_deleteMutex); mutable VerilatedMutex m_mutex; // Mutex protecting the 'new garbage' queue mutable VerilatedMutex m_deleteMutex; // Mutex protecting the delete queue