X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FMain.c;h=6aef280e256b1476e30422678ad70e7e5618d302;hb=6a710247bc1a7b9bced7a4e6f143de91eb4f9552;hp=cceb607f4d577a2cd72722c03b238c54387fed48;hpb=95ca6bff6fc9918203173b442192d9298ef9757a;p=ghc-hetmet.git diff --git a/ghc/rts/Main.c b/ghc/rts/Main.c index cceb607..6aef280 100644 --- a/ghc/rts/Main.c +++ b/ghc/rts/Main.c @@ -1,5 +1,4 @@ /* ----------------------------------------------------------------------------- - * $Id: Main.c,v 1.42 2004/09/03 15:28:34 simonmar Exp $ * * (c) The GHC Team 1998-2000 * @@ -17,6 +16,7 @@ #include "RtsFlags.h" #include "RtsUtils.h" #include "Prelude.h" +#include "Task.h" #include #ifdef DEBUG @@ -101,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 */