[insight-vmi] r1996 committed - Protect access to static data structure by a mutex to avoid multi-

0 views
Skip to first unread message

insig...@googlecode.com

unread,
Jun 24, 2013, 10:46:03 AM6/24/13
to insight-v...@googlegroups.com
Revision: 1996
Author: chrsc...@googlemail.com
Date: Mon Jun 24 07:45:33 2013
Log: Protect access to static data structure by a mutex to avoid multi-

http://code.google.com/p/insight-vmi/source/detail?r=1996

Modified:
/trunk/libinsight/memorymap.cpp

=======================================
--- /trunk/libinsight/memorymap.cpp Thu Feb 21 07:16:04 2013
+++ /trunk/libinsight/memorymap.cpp Mon Jun 24 07:45:33 2013
@@ -42,6 +42,9 @@

const QString& MemoryMap::insertName(const QString& name)
{
+ static QMutex mutex;
+ QMutexLocker lock(&mutex);
+
StringSet::const_iterator it = _names.constFind(name);
if (it == _names.constEnd())
it = _names.insert(name);
Reply all
Reply to author
Forward
0 new messages