[project @ 2002-05-01 15:46:14 by simonmar]
[ghc-hetmet.git] / ghc / includes / RtsAPI.h
index 0cb351d..7672dc6 100644 (file)
@@ -1,5 +1,5 @@
 /* ----------------------------------------------------------------------------
- * $Id: RtsAPI.h,v 1.23 2001/10/23 11:30:07 simonmar Exp $
+ * $Id: RtsAPI.h,v 1.26 2002/02/15 07:23:02 sof Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
 #ifndef RTSAPI_H
 #define RTSAPI_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include "HsFFI.h"
 
 /*
@@ -19,8 +23,7 @@ typedef enum {
     NoStatus,    /* not finished yet */
     Success,    /* completed successfully */
     Killed,     /* uncaught exception */
-    Interrupted, /* stopped in response to a call to interruptStgRts */
-    Deadlock    /* no threads to run, but main thread hasn't finished */
+    Interrupted  /* stopped in response to a call to interruptStgRts */
 } SchedulerStatus;
 
 typedef StgClosure *HaskellObj;
@@ -98,6 +101,12 @@ rts_eval_ ( HaskellObj p, unsigned int stack_size, /*out*/HaskellObj *ret );
 SchedulerStatus 
 rts_evalIO ( HaskellObj p, /*out*/HaskellObj *ret );
 
+#if defined(COMPILING_RTS_MAIN)
+/* Used by the RTS' main() only */
+SchedulerStatus 
+rts_mainEvalIO ( HaskellObj p, /*out*/HaskellObj *ret );
+#endif
+
 SchedulerStatus
 rts_evalStableIO ( HsStablePtr s, /*out*/HsStablePtr *ret );
 
@@ -107,4 +116,10 @@ rts_evalLazyIO ( HaskellObj p, unsigned int stack_size, /*out*/HaskellObj *ret )
 void
 rts_checkSchedStatus ( char* site, SchedulerStatus rc);
 
+/* -------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* RTSAPI_H */