X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FMain.c;h=a651eaa3a902602f2529d59920111abb463c9c09;hb=aa698b4b602c576ba9fa3e1d3cd8523e9c2b1f99;hp=1c721b795cfab8363b0c569f29785873456e5dbc;hpb=1b28d4e1f43185ad8c8e7407c66413e1b358402b;p=ghc-hetmet.git diff --git a/ghc/rts/Main.c b/ghc/rts/Main.c index 1c721b7..a651eaa 100644 --- a/ghc/rts/Main.c +++ b/ghc/rts/Main.c @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- - * $Id: Main.c,v 1.14 2000/01/13 14:34:03 hwloidl Exp $ + * $Id: Main.c,v 1.39 2003/07/10 08:02:29 simonpj Exp $ * - * (c) The GHC Team 1998-1999 + * (c) The GHC Team 1998-2000 * * Main function for a standalone Haskell program. * @@ -9,11 +9,15 @@ #define COMPILING_RTS_MAIN +#include "PosixSource.h" #include "Rts.h" #include "RtsAPI.h" #include "SchedAPI.h" +#include "Schedule.h" #include "RtsFlags.h" #include "RtsUtils.h" +#include "Prelude.h" +#include #ifdef DEBUG # include "Printer.h" /* for printing */ @@ -24,8 +28,8 @@ #endif #ifdef PAR -# include "ParInit.h" # include "Parallel.h" +# include "ParallelRts.h" # include "LLC.h" #endif @@ -37,18 +41,19 @@ # include #endif +extern void __stginit_ZCMain(void); /* Hack: we assume that we're building a batch-mode system unless * INTERPRETER is set */ -# ifndef INTERPRETER /* Hack */ +#ifndef INTERPRETER /* Hack */ int main(int argc, char *argv[]) { int exit_status; SchedulerStatus status; /* all GranSim/GUM init is done in startupHaskell; sets IAmMainThread! */ - startupHaskell(argc,argv); + startupHaskell(argc,argv,__stginit_ZCMain); /* kick off the computation by creating the main thread with a pointer to mainIO_closure representing the computation of the overall program; @@ -63,11 +68,11 @@ int main(int argc, char *argv[]) # if defined(PAR) -# if DEBUG +# if defined(DEBUG) { /* a wait loop to allow attachment of gdb to UNIX threads */ nat i, j, s; - for (i=0, s=0; i