X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FMain.c;h=6aef280e256b1476e30422678ad70e7e5618d302;hb=1f5e3b2472084434edf71a89c4764d1509e8e9b0;hp=182f589af053dc58c3bcf518c53ff39936670285;hpb=eab7055a9512b150681156f146ee76ad8f67b72f;p=ghc-hetmet.git diff --git a/ghc/rts/Main.c b/ghc/rts/Main.c index 182f589..6aef280 100644 --- a/ghc/rts/Main.c +++ b/ghc/rts/Main.c @@ -49,16 +49,7 @@ int main(int argc, char *argv[]) SchedulerStatus status; /* all GranSim/GUM init is done in startupHaskell; sets IAmMainThread! */ -#if defined(PROFILING) startupHaskell(argc,argv,__stginit_ZCMain); -#else - startupHaskell(argc,argv,NULL); -#endif - - /* 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; @@ -110,9 +101,12 @@ int main(int argc, char *argv[]) # else /* !PAR && !GRAN */ /* ToDo: want to start with a larger stack size */ - rts_lock(); - status = rts_evalLazyIO((HaskellObj)mainIO_closure, NULL); - rts_unlock(); + { + void *cap = rts_lock(); + cap = rts_evalLazyIO(cap,(HaskellObj)(void *)mainIO_closure, NULL); + status = rts_getSchedStatus(cap); + rts_unlock(cap); + } # endif /* !PAR && !GRAN */