/* ----------------------------------------------------------------------------
- * $Id: RtsAPI.h,v 1.22 2001/08/03 16:30:13 sof 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"
/*
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;
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 );
+
SchedulerStatus
rts_evalLazyIO ( HaskellObj p, unsigned int stack_size, /*out*/HaskellObj *ret );
void
rts_checkSchedStatus ( char* site, SchedulerStatus rc);
+/* -------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* RTSAPI_H */