X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FMain.c;h=c6d41702a830c44a205b337f816c81e94c9b709f;hb=e15f2200821e56b081ebbf012c78aa83dcc47869;hp=7721438646fcd663ce064a102234c94634fe69eb;hpb=94e06463420582cc2d336b39a297e82af39e4cc4;p=ghc-hetmet.git diff --git a/ghc/rts/Main.c b/ghc/rts/Main.c index 7721438..c6d4170 100644 --- a/ghc/rts/Main.c +++ b/ghc/rts/Main.c @@ -16,6 +16,7 @@ #include "RtsFlags.h" #include "RtsUtils.h" #include "Prelude.h" +#include "Task.h" #include #ifdef DEBUG @@ -50,6 +51,11 @@ int main(int argc, char *argv[]) startupHaskell(argc,argv,__stginit_ZCMain); + /* Register this thread as a task, so we can get timing stats about it */ +#if defined(RTS_SUPPORTS_THREADS) + threadIsTask(osThreadId()); +#endif + /* kick off the computation by creating the main thread with a pointer to mainIO_closure representing the computation of the overall program; then enter the scheduler with this thread and off we go;