diff options
author | Pixel <pixel@nobis-crew.org> | 2011-11-10 09:45:37 +0100 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-11-10 09:45:37 +0100 |
commit | eb773a11ab557e01569b95254d7e21a53706640d (patch) | |
tree | 0796dc5844e6afccb24d6117070e3590a272a93c | |
parent | 8b7d47a50a72729374c11466eac6da752a8f8425 (diff) |
Fixing that heisenbug. Huh, yeah, it's usually better to use a real TLS instead of a dummy one...
-rw-r--r-- | src/Local.cc | 1 | ||||
-rw-r--r-- | tests/test-Threads.cc | 1 |
2 files changed, 2 insertions, 0 deletions
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."); |