From: panne Date: Fri, 26 Sep 2003 13:32:14 +0000 (+0000) Subject: [project @ 2003-09-26 13:32:14 by panne] X-Git-Tag: Approx_11550_changesets_converted~405 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b9fbc901cf1088361e93eaea40235fee5249d5a4;p=ghc-hetmet.git [project @ 2003-09-26 13:32:14 by panne] Warning police --- diff --git a/ghc/rts/OSThreads.c b/ghc/rts/OSThreads.c index 06b905a..5d3c8c9 100644 --- a/ghc/rts/OSThreads.c +++ b/ghc/rts/OSThreads.c @@ -259,7 +259,7 @@ forkOS_createThread ( HsStablePtr entry ) #else /* !defined(RTS_SUPPORTS_THREADS) */ int -forkOS_createThread ( HsStablePtr entry ) +forkOS_createThread ( HsStablePtr entry STG_UNUSED ) { return -1; } diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index d29b6bb..2754c4f 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1,5 +1,5 @@ /* --------------------------------------------------------------------------- - * $Id: Schedule.c,v 1.174 2003/09/21 22:20:56 wolfgang Exp $ + * $Id: Schedule.c,v 1.175 2003/09/26 13:32:14 panne Exp $ * * (c) The GHC Team, 1998-2000 * @@ -130,6 +130,18 @@ #include #endif +#ifdef THREADED_RTS +#define USED_IN_THREADED_RTS +#else +#define USED_IN_THREADED_RTS STG_UNUSED +#endif + +#ifdef RTS_SUPPORTS_THREADS +#define USED_WHEN_RTS_SUPPORTS_THREADS +#else +#define USED_WHEN_RTS_SUPPORTS_THREADS STG_UNUSED +#endif + //@node Variables and Data structures, Prototypes, Includes, Main scheduling code //@subsection Variables and Data structures @@ -358,7 +370,8 @@ startSchedulerTask(void) ------------------------------------------------------------------------ */ //@cindex schedule static void -schedule( StgMainThread *mainThread, Capability *initialCapability ) +schedule( StgMainThread *mainThread USED_WHEN_RTS_SUPPORTS_THREADS, + Capability *initialCapability ) { StgTSO *t; Capability *cap = initialCapability; @@ -1592,7 +1605,7 @@ rtsSupportsBoundThreads(void) * ------------------------------------------------------------------------- */ StgBool -isThreadBound(StgTSO* tso) +isThreadBound(StgTSO* tso USED_IN_THREADED_RTS) { #ifdef THREADED_RTS StgMainThread *m; @@ -1609,8 +1622,10 @@ isThreadBound(StgTSO* tso) * Singleton fork(). Do not copy any running threads. * ------------------------------------------------------------------------- */ +#ifdef THREADED_RTS static void deleteThreadImmediately(StgTSO *tso); +#endif StgInt forkProcess(StgTSO* tso) @@ -3474,6 +3489,7 @@ deleteThread(StgTSO *tso) raiseAsync(tso,NULL); } +#ifdef THREADED_RTS static void deleteThreadImmediately(StgTSO *tso) { // for forkProcess only: @@ -3485,6 +3501,7 @@ deleteThreadImmediately(StgTSO *tso) unblockThread(tso); tso->what_next = ThreadKilled; } +#endif void raiseAsyncWithLock(StgTSO *tso, StgClosure *exception)