diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-04-01 08:12:25 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-04-01 08:12:25 (GMT) |
commit | 59a4daf8097c67918003efbc1a1071e2de63990a (patch) | |
tree | 154f741a8d0caff6d3f4f13acc818110636ff5a5 | |
parent | 0b8309b6b7820c0036f1f8cd2253477e67a8b165 (diff) | |
download | Qt-59a4daf8097c67918003efbc1a1071e2de63990a.zip Qt-59a4daf8097c67918003efbc1a1071e2de63990a.tar.gz Qt-59a4daf8097c67918003efbc1a1071e2de63990a.tar.bz2 |
Revert "Make use of a thread-specific variable in qFlagLocation."
This reverts commit ba25c4a832516124bcd97758de9eede32797c5a0.
I hadn't meant to merge this commit as it is not ready and not OK'ed
by Brad yet.
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 0e632db..05015c0 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -2179,29 +2179,13 @@ void QObject::deleteLater() Signals and slots *****************************************************************************/ -// list taken from http://en.wikipedia.org/wiki/Thread-Specific_Storage -#if defined(Q_OS_WIN) -// Some people like to dynamically load Qt (LoadLibrary), so we can't use this -#elif defined(Q_CC_GNU) && !defined(Q_WS_QWS) -// GCC has warnings about this not being ported to all archs -// So we only enable what we know to work. More archs can be added later, like Mac -# if defined(Q_OS_LINUX) && (defined(QT_ARCH_I386) || defined(QT_ARCH_X86_64) || defined(QT_ARCH_IA64)) -# define THRSPECIFIC __thread __attribute__((tls_model("local-dynamic"))) -# endif -#elif defined(Q_CC_SUN) || defined(Q_CC_INTEL) || defined(Q_CC_XLC) -# define THRSPECIFIC __thread -#endif - -#ifndef THRSPECIFIC -# define THRSPECIFIC -#endif const int flagged_locations_count = 2; -static THRSPECIFIC const char* flagged_locations[flagged_locations_count] = {0}; +static const char* flagged_locations[flagged_locations_count] = {0}; const char *qFlagLocation(const char *method) { - static THRSPECIFIC int idx = 0; + static int idx = 0; flagged_locations[idx] = method; idx = (idx+1) % flagged_locations_count; return method; |