From f86b9ce4f5830feb70d48e626fe60a75616ba941 Mon Sep 17 00:00:00 2001 From: sof <unknown> Date: Tue, 6 Jul 1999 09:42:39 +0000 Subject: [PATCH] [project @ 1999-07-06 09:42:38 by sof] Redo previous commit to cut down on the use of COMPILING_RTS where possible - SchedAPI.h is now an RTS internal header file which RtsAPI.h no longer includes. --- ghc/includes/RtsAPI.h | 15 ++++++++++++--- ghc/includes/SchedAPI.h | 18 +----------------- ghc/includes/Stg.h | 4 +--- ghc/rts/RtsAPI.c | 3 ++- 4 files changed, 16 insertions(+), 24 deletions(-) diff --git a/ghc/includes/RtsAPI.h b/ghc/includes/RtsAPI.h index 33da457de748..0e7883d8efc6 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.7 1999/07/06 09:42:39 sof Exp $ * * (c) The GHC Team, 1998-1999 * @@ -10,8 +10,17 @@ #ifndef RTSAPI_H #define RTSAPI_H -#include "SchedAPI.h" /* for SchedulerStatus */ - +/* + * Running the scheduler + */ +typedef enum { + Success, + Killed, /* another thread killed us */ + Interrupted, /* stopped in response to a call to interruptStgRts */ + Deadlock, + AllBlocked, /* subtly different from Deadlock */ +} SchedulerStatus; + typedef StgClosure *HaskellObj; /* ---------------------------------------------------------------------------- diff --git a/ghc/includes/SchedAPI.h b/ghc/includes/SchedAPI.h index 4c0d0ab2bfee..b682dfd686fb 100644 --- a/ghc/includes/SchedAPI.h +++ b/ghc/includes/SchedAPI.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: SchedAPI.h,v 1.5 1999/07/03 18:39:41 sof Exp $ + * $Id: SchedAPI.h,v 1.6 1999/07/06 09:42:39 sof Exp $ * * (c) The GHC Team 1998 * @@ -11,27 +11,12 @@ #ifndef SCHEDAPI_H #define SCHEDAPI_H -/* - * Running the scheduler - */ - -typedef enum { - Success, - Killed, /* another thread killed us */ - Interrupted, /* stopped in response to a call to interruptStgRts */ - Deadlock, - 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); /* @@ -92,6 +77,5 @@ void deleteThread(StgTSO *tso); */ void RevertCAFs(void); -#endif #endif diff --git a/ghc/includes/Stg.h b/ghc/includes/Stg.h index 332f515fdf18..9b2ab0d5c0ec 100644 --- a/ghc/includes/Stg.h +++ b/ghc/includes/Stg.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Stg.h,v 1.16 1999/07/06 09:19:47 sof Exp $ + * $Id: Stg.h,v 1.17 1999/07/06 09:42:39 sof Exp $ * * (c) The GHC Team, 1998-1999 * @@ -103,9 +103,7 @@ void _stgAssert (char *, unsigned int); #include "TailCalls.h" /* RTS public interface */ -#ifndef COMPILING_RTS #include "RtsAPI.h" -#endif /* these are all ANSI C headers */ #include <stdlib.h> diff --git a/ghc/rts/RtsAPI.c b/ghc/rts/RtsAPI.c index 5f8648bb86a8..9e0c507d16c1 100644 --- a/ghc/rts/RtsAPI.c +++ b/ghc/rts/RtsAPI.c @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: RtsAPI.c,v 1.7 1999/05/21 14:46:19 sof Exp $ + * $Id: RtsAPI.c,v 1.8 1999/07/06 09:42:38 sof Exp $ * * (c) The GHC Team, 1998-1999 * @@ -10,6 +10,7 @@ #include "Rts.h" #include "Storage.h" #include "RtsAPI.h" +#include "SchedAPI.h" #include "RtsFlags.h" #include "RtsUtils.h" -- GitLab