/* ----------------------------------------------------------------------------
- * $Id: RtsAPI.h,v 1.5 1999/05/21 14:46:20 sof Exp $
+ * $Id: RtsAPI.h,v 1.6 1999/07/03 18:39:41 sof Exp $
*
* (c) The GHC Team, 1998-1999
*
------------------------------------------------------------------------- */
extern void startupHaskell ( int argc, char *argv[] );
extern void shutdownHaskell ( void );
+extern void shutdownHaskellAndExit ( int exitCode );
/* ----------------------------------------------------------------------------
Building Haskell objects from C datatypes.
/* -----------------------------------------------------------------------------
- * $Id: SchedAPI.h,v 1.4 1999/06/03 08:09:31 sof Exp $
+ * $Id: SchedAPI.h,v 1.5 1999/07/03 18:39:41 sof Exp $
*
* (c) The GHC Team 1998
*
AllBlocked, /* subtly different from Deadlock */
} SchedulerStatus;
+
+/*
+ * schedule() plus the thread creation functions are not part
+ * part of the external RTS API, so leave them out if we're
+ * not compiling rts/ bits. -- sof 7/99
+ *
+ */
+#ifdef COMPILING_RTS
+
SchedulerStatus schedule(StgTSO *main_thread, /*out*/StgClosure **ret);
/*
*/
void RevertCAFs(void);
+#endif
#endif
/* -----------------------------------------------------------------------------
- * $Id: RtsStartup.c,v 1.15 1999/07/02 09:31:54 simonmar Exp $
+ * $Id: RtsStartup.c,v 1.16 1999/07/03 18:39:40 sof Exp $
*
* (c) The GHC Team, 1998-1999
*
end_init();
}
+/*
+ * Shutting down the RTS - two ways of doing this, one which
+ * calls exit(), one that doesn't.
+ *
+ * (shutdownHaskellAndExit() is called by System.exitWith).
+ */
+void
+shutdownHaskellAndExit(int n)
+{
+ shutdownHaskell();
+ stg_exit(n);
+}
+
void
shutdownHaskell(void)
{