further fix for floating point primitives
[ghc-hetmet.git] / ghc / rts / Task.c
index b8bf1c4..bc140c1 100644 (file)
@@ -97,7 +97,8 @@ newTask (void)
 #endif
 
 #if defined(THREADED_RTS)
-    getProcessTimes(&currentUserTime, &currentElapsedTime);
+    currentUserTime = getThreadCPUTime();
+    currentElapsedTime = getProcessElapsedTime();
     task->mut_time = 0.0;
     task->mut_etime = 0.0;
     task->gc_time = 0.0;
@@ -174,9 +175,6 @@ void
 discardTask (Task *task)
 {
     ASSERT_LOCK_HELD(&sched_mutex);
-#if defined(THREADED_RTS)
-    closeCondition(&task->cond);
-#endif
     task->stopped = rtsTrue;
     task->cap = NULL;
     task->next = task_free_list;
@@ -194,7 +192,8 @@ taskStop (Task *task)
     ASSERT(task->id == id);
     ASSERT(myTask() == task);
 
-    getProcessTimes(&currentUserTime, &currentElapsedTime);
+    currentUserTime = getThreadCPUTime();
+    currentElapsedTime = getProcessElapsedTime();
 
     // XXX this is wrong; we want elapsed GC time since the
     // Task started.