summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread_unix.cpp
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2010-04-09 13:16:09 (GMT)
committerMartin Smith <msmith@trolltech.com>2010-04-09 13:16:09 (GMT)
commit0bd75b67bc23d51670822305a31e19a74ca7134e (patch)
tree41b37d4e21ffd4b7bb7974e6b2bf9aa6494b5781 /src/corelib/thread/qthread_unix.cpp
parent5e5836702662783a4fba5f95a487948e5c6d2a4e (diff)
parente4cae397e3737551752487000e152162d0878f88 (diff)
downloadQt-0bd75b67bc23d51670822305a31e19a74ca7134e.zip
Qt-0bd75b67bc23d51670822305a31e19a74ca7134e.tar.gz
Qt-0bd75b67bc23d51670822305a31e19a74ca7134e.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'src/corelib/thread/qthread_unix.cpp')
-rw-r--r--src/corelib/thread/qthread_unix.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 5a50646..6b34b5f 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -136,6 +136,12 @@ static void create_current_thread_data_key()
pthread_key_create(&current_thread_data_key, destroy_current_thread_data);
}
+static void destroy_current_thread_data_key()
+{
+ pthread_key_delete(current_thread_data_key);
+}
+Q_DESTRUCTOR_FUNCTION(destroy_current_thread_data_key)
+
QThreadData *QThreadData::current()
{
pthread_once(&current_thread_data_once, create_current_thread_data_key);