summaryrefslogtreecommitdiff
path: root/rts/posix/OSThreads.c
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2006-06-07 12:44:07 +0000
committerSimon Marlow <simonmar@microsoft.com>2006-06-07 12:44:07 +0000
commita91cc8496bf4ea7fe1e3ad9d97836152f3939ffa (patch)
treee7b25c3ce7293d0569da142f7928fde9a9257359 /rts/posix/OSThreads.c
parent90d88088ee8b3697ce68f7b1e07506bc4f33687d (diff)
downloadhaskell-a91cc8496bf4ea7fe1e3ad9d97836152f3939ffa.tar.gz
Gather timing stats for a Task when it completes.
Previously we did this just for workers, now we do it for the main thread and for forkOS threads too.
Diffstat (limited to 'rts/posix/OSThreads.c')
-rw-r--r--rts/posix/OSThreads.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c
index 07bd762130..cff37824cb 100644
--- a/rts/posix/OSThreads.c
+++ b/rts/posix/OSThreads.c
@@ -16,6 +16,7 @@
#if defined(THREADED_RTS)
#include "OSThreads.h"
#include "RtsUtils.h"
+#include "Task.h"
#if HAVE_STRING_H
#include <string.h>
@@ -140,6 +141,7 @@ forkOS_createThreadWrapper ( void * entry )
Capability *cap;
cap = rts_lock();
cap = rts_evalStableIO(cap, (HsStablePtr) entry, NULL);
+ taskTimeStamp(myTask());
rts_unlock(cap);
return NULL;
}