From 7f4f068ebdfd51c358648e514660b23d586d4929 Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Thu, 1 Aug 2013 19:10:39 -0700 Subject: When creating a new Task, steal the TLS values from its creator. --- src/Task.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Task.cc b/src/Task.cc index 788424b..ed03532 100644 --- a/src/Task.cc +++ b/src/Task.cc @@ -8,6 +8,7 @@ static Balau::LocalTmpl localTask; Balau::Task::Task() : m_status(STARTING), m_okayToEAgain(false), m_stackless(false) { Printer::elog(E_TASK, "Created a Task at %p", this); + m_tls = Local::createTLS(g_tlsManager->getTLS()); } bool Balau::Task::needsStacks() { @@ -37,7 +38,6 @@ void Balau::Task::setup(TaskMan * taskMan, void * stack) { m_taskMan = taskMan; - m_tls = Local::createTLS(); void * oldTLS = g_tlsManager->getTLS(); g_tlsManager->setTLS(m_tls); localTask.set(this); -- cgit v1.2.3