summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qthread_p.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h
index d404b53..7c9cfc4 100644
--- a/src/corelib/thread/qthread_p.h
+++ b/src/corelib/thread/qthread_p.h
@@ -229,6 +229,26 @@ public:
return canWait;
}
+ // This class provides per-thread (by way of being a QThreadData
+ // member) storage for qFlagLocation()
+ class FlaggedDebugSignatures
+ {
+ static const uint Count = 2;
+
+ uint idx;
+ const char* locations[Count];
+
+ public:
+ FlaggedDebugSignatures() : idx(0)
+ { std::fill_n(locations, Count, static_cast<char*>(0)); }
+
+ void store(const char* method)
+ { locations[idx++ % Count] = method; }
+
+ bool contains(const char *method) const
+ { return std::find(locations, locations + Count, method) != locations + Count; }
+ };
+
QThread *thread;
Qt::HANDLE threadId;
bool quitNow;
@@ -243,6 +263,8 @@ public:
# ifdef Q_OS_SYMBIAN
RThread symbian_thread_handle;
# endif
+
+ FlaggedDebugSignatures flaggedSignatures;
};
class QScopedLoopLevelCounter