X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FRtsAPI.h;h=231af06161edb9f1dd7816571b9f5e74f894a3c1;hb=a1b528ae206aa1bc17f99dbf665da5c271c8580c;hp=33da457de74866b18d7a037fdadcc88910c572a5;hpb=d1a47b329fd21ab5a7db1dbe47959a874e8648e6;p=ghc-hetmet.git diff --git a/ghc/includes/RtsAPI.h b/ghc/includes/RtsAPI.h index 33da457..231af06 100644 --- a/ghc/includes/RtsAPI.h +++ b/ghc/includes/RtsAPI.h @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: RtsAPI.h,v 1.6 1999/07/03 18:39:41 sof Exp $ + * $Id: RtsAPI.h,v 1.11 2000/03/31 03:09:35 hwloidl Exp $ * * (c) The GHC Team, 1998-1999 * @@ -10,14 +10,23 @@ #ifndef RTSAPI_H #define RTSAPI_H -#include "SchedAPI.h" /* for SchedulerStatus */ +/* + * Running the scheduler + */ +typedef enum { + NoStatus, /* not finished yet */ + Success, + Killed, /* another thread killed us */ + Interrupted, /* stopped in response to a call to interruptStgRts */ + Deadlock /* no threads to run, but main thread hasn't finished */ +} SchedulerStatus; typedef StgClosure *HaskellObj; /* ---------------------------------------------------------------------------- Starting up and shutting down the Haskell RTS. ------------------------------------------------------------------------- */ -extern void startupHaskell ( int argc, char *argv[] ); +extern void startupHaskell ( int argc, char *argv[], void *init_root ); extern void shutdownHaskell ( void ); extern void shutdownHaskellAndExit ( int exitCode ); @@ -75,6 +84,11 @@ rts_evalIO ( HaskellObj p, /*out*/HaskellObj *ret ); SchedulerStatus rts_evalLazyIO ( HaskellObj p, unsigned int stack_size, /*out*/HaskellObj *ret ); +#if defined(PAR) || defined(SMP) +SchedulerStatus +rts_evalNothing(unsigned int stack_size); +#endif + void rts_checkSchedStatus ( char* site, SchedulerStatus rc);