summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNicolas Noble <pixel@nobis-crew.org>2013-08-01 19:10:39 -0700
committerNicolas Noble <pixel@nobis-crew.org>2013-08-01 19:10:39 -0700
commit7f4f068ebdfd51c358648e514660b23d586d4929 (patch)
tree0b3509369a98db35fcca56d0b27feada2a7f8d5b /src
parent20b8ddc82b3c7b725993b2053acb35676801ce8b (diff)
When creating a new Task, steal the TLS values from its creator.
Diffstat (limited to 'src')
-rw-r--r--src/Task.cc2
1 files changed, 1 insertions, 1 deletions
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<Balau::Task> 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);