Make CacheTransaction a QMetatype, allowing for queued connections
MODIFY
external/VSRTL
external/VSRTL
-Subproject commit d1d845ff21028a693a057bf665b34a3dc0e4fef6
+Subproject commit 0ceb6d333d80bf98535c8eeed003e7b89371ee8d

MODIFY
src/cachesim/cachegraphic.cpp
src/cachesim/cachegraphic.cpp
@@ -73,7 +73,9 @@ private:
};
CacheGraphic::CacheGraphic(CacheSim& cache) : QGraphicsObject(nullptr), m_cache(cache), m_fm(m_font) {
- connect(&cache, &CacheSim::dataChanged, this, &CacheGraphic::dataChanged);
+ // Connect to CacheSim::dataChanged using QueuedConnection, to ensure allow for cross thread signalling (CacheSim is
+ // executed in the same thread as the simulator).
+ connect(&cache, &CacheSim::dataChanged, this, &CacheGraphic::dataChanged, Qt::QueuedConnection);
connect(&cache, &CacheSim::wayInvalidated, this, &CacheGraphic::wayInvalidated);
connect(&cache, &CacheSim::cacheInvalidated, this, &CacheGraphic::cacheInvalidated);

MODIFY
src/cachesim/cachesim.h
src/cachesim/cachesim.h
@@ -306,3 +306,5 @@ const static std::map<WritePolicy, QString> s_cacheWritePolicyStrings{{WritePoli
{WritePolicy::WriteBack, "Write-back"}};
} // namespace Ripes
+
+Q_DECLARE_METATYPE(Ripes::CacheSim::CacheTransaction);

Make CacheTransaction a QMetatype, allowing for queued connections