summaryrefslogtreecommitdiff
path: root/rts/Task.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2010-09-15 12:06:27 +0000
committerSimon Marlow <marlowsd@gmail.com>2010-09-15 12:06:27 +0000
commit65da401ae6579ad47f06bcf80b1f3022c9963ca4 (patch)
tree71782907aa7a9043b00f0f8e52498817469225e9 /rts/Task.c
parentc76348fc03f302ffd8201b912eef4724b3fa60a4 (diff)
downloadhaskell-65da401ae6579ad47f06bcf80b1f3022c9963ca4.tar.gz
Windows: use a thread-local variable for myTask()
Which entailed fixing an incorrect #ifdef in Task.c
Diffstat (limited to 'rts/Task.c')
-rw-r--r--rts/Task.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rts/Task.c b/rts/Task.c
index 8a289be007..e93d60d86f 100644
--- a/rts/Task.c
+++ b/rts/Task.c
@@ -63,8 +63,10 @@ initTaskManager (void)
if (!tasksInitialized) {
taskCount = 0;
tasksInitialized = 1;
-#if defined(THREADED_RTS) && !defined(MYTASK_USE_TLV)
+#if defined(THREADED_RTS)
+#if !defined(MYTASK_USE_TLV)
newThreadLocalKey(&currentTaskKey);
+#endif
initMutex(&all_tasks_mutex);
#endif
}