From eb773a11ab557e01569b95254d7e21a53706640d Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 10 Nov 2011 09:45:37 +0100 Subject: Fixing that heisenbug. Huh, yeah, it's usually better to use a real TLS instead of a dummy one... --- src/Local.cc | 1 + tests/test-Threads.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Local.cc b/src/Local.cc index 8418fb1..805ecdb 100644 --- a/src/Local.cc +++ b/src/Local.cc @@ -47,6 +47,7 @@ void PThreadsTLSManager::doStart() { r = pthread_key_create(&m_key, NULL); Assert(r == 0); + Balau::g_tlsManager = this; } void * PThreadsTLSManager::getTLS() { diff --git a/tests/test-Threads.cc b/tests/test-Threads.cc index 82bc9ec..1005906 100644 --- a/tests/test-Threads.cc +++ b/tests/test-Threads.cc @@ -23,6 +23,7 @@ void MainTask::Do() { t->threadStart(); Printer::log(M_STATUS, "Joining thread"); t->join(); + Printer::log(M_STATUS, "Deleting thread"); delete t; Printer::log(M_STATUS, "Test::Threads passed."); -- cgit v1.2.3