Commit b933b469 authored by simonmar's avatar simonmar
Browse files

[project @ 2000-01-12 15:15:17 by simonmar]

Add 'par' and sparking support to the SMP implementation.
parent b034fbda
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: PrimOps.h,v 1.42 2000/01/07 10:27:33 sewardj Exp $ * $Id: PrimOps.h,v 1.43 2000/01/12 15:15:17 simonmar Exp $
* *
* (c) The GHC Team, 1998-1999 * (c) The GHC Team, 1998-1999
* *
...@@ -734,6 +734,19 @@ EF_(unblockAsyncExceptionszh_fast); ...@@ -734,6 +734,19 @@ EF_(unblockAsyncExceptionszh_fast);
extern int cmp_thread(const StgTSO *tso1, const StgTSO *tso2); extern int cmp_thread(const StgTSO *tso1, const StgTSO *tso2);
#if defined(SMP) || defined(PAR)
#define parzh(r,node) \
{ \
if (closure_SHOULD_SPARK((StgClosure *)node) && \
SparkTl < SparkLim) { \
*SparkTl++ = (StgClosure *)(node); \
} \
r = 1; \
}
#else
#define parzh(r,node) r = 1
#endif
/* Hmm, I'll think about these later. */ /* Hmm, I'll think about these later. */
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
Pointer equality Pointer equality
......
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: Regs.h,v 1.7 1999/11/09 15:57:39 simonmar Exp $ * $Id: Regs.h,v 1.8 2000/01/12 15:15:17 simonmar Exp $
* *
* (c) The GHC Team, 1998-1999 * (c) The GHC Team, 1998-1999
* *
...@@ -25,6 +25,13 @@ ...@@ -25,6 +25,13 @@
* 2) caller-saves registers are saved across a CCall * 2) caller-saves registers are saved across a CCall
*/ */
typedef struct StgSparkPool_ {
StgClosure **base;
StgClosure **lim;
StgClosure **hd;
StgClosure **tl;
} StgSparkPool;
typedef struct StgRegTable_ { typedef struct StgRegTable_ {
StgUnion rR1; StgUnion rR1;
StgUnion rR2; StgUnion rR2;
...@@ -51,8 +58,11 @@ typedef struct StgRegTable_ { ...@@ -51,8 +58,11 @@ typedef struct StgRegTable_ {
StgTSO *rCurrentTSO; StgTSO *rCurrentTSO;
struct _bdescr *rNursery; struct _bdescr *rNursery;
struct _bdescr *rCurrentNursery; struct _bdescr *rCurrentNursery;
#ifdef SMP #if defined(SMP) || defined(PAR)
struct StgRegTable_ *link; StgSparkPool rSparks; /* per-task spark pool */
#endif
#if defined(SMP)
struct StgRegTable_ *link; /* per-task register tables are linked together */
#endif #endif
} StgRegTable; } StgRegTable;
...@@ -103,6 +113,12 @@ extern DLL_IMPORT_RTS StgRegTable MainRegTable; ...@@ -103,6 +113,12 @@ extern DLL_IMPORT_RTS StgRegTable MainRegTable;
#define SAVE_CurrentTSO (BaseReg->rCurrentTSO) #define SAVE_CurrentTSO (BaseReg->rCurrentTSO)
#define SAVE_CurrentNursery (BaseReg->rCurrentNursery) #define SAVE_CurrentNursery (BaseReg->rCurrentNursery)
#if defined(SMP) || defined(PAR)
#define SAVE_SparkHd (BaseReg->rSparks.hd)
#define SAVE_SparkTl (BaseReg->rSparks.tl)
#define SAVE_SparkBase (BaseReg->rSparks.base)
#define SAVE_SparkLim (BaseReg->rSparks.lim)
#endif
/* We sometimes need to save registers across a C-call, eg. if they /* We sometimes need to save registers across a C-call, eg. if they
* are clobbered in the standard calling convention. We define the * are clobbered in the standard calling convention. We define the
...@@ -304,6 +320,30 @@ GLOBAL_REG_DECL(bdescr *,CurrentNursery,REG_CurrentNursery) ...@@ -304,6 +320,30 @@ GLOBAL_REG_DECL(bdescr *,CurrentNursery,REG_CurrentNursery)
#define CurrentNursery (BaseReg->rCurrentNursery) #define CurrentNursery (BaseReg->rCurrentNursery)
#endif #endif
#ifdef REG_SparkHd
GLOBAL_REG_DECL(bdescr *,SparkHd,REG_SparkHd)
#else
#define SparkHd (BaseReg->rSparks.hd)
#endif
#ifdef REG_SparkTl
GLOBAL_REG_DECL(bdescr *,SparkTl,REG_SparkTl)
#else
#define SparkTl (BaseReg->rSparks.tl)
#endif
#ifdef REG_SparkBase
GLOBAL_REG_DECL(bdescr *,SparkBase,REG_SparkBase)
#else
#define SparkBase (BaseReg->rSparks.base)
#endif
#ifdef REG_SparkLim
GLOBAL_REG_DECL(bdescr *,SparkLim,REG_SparkLim)
#else
#define SparkLim (BaseReg->rSparks.lim)
#endif
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
For any registers which are denoted "caller-saves" by the C calling For any registers which are denoted "caller-saves" by the C calling
convention, we have to emit code to save and restore them across C convention, we have to emit code to save and restore them across C
...@@ -513,6 +553,38 @@ GLOBAL_REG_DECL(bdescr *,CurrentNursery,REG_CurrentNursery) ...@@ -513,6 +553,38 @@ GLOBAL_REG_DECL(bdescr *,CurrentNursery,REG_CurrentNursery)
#define CALLER_RESTORE_CurrentNursery /* nothing */ #define CALLER_RESTORE_CurrentNursery /* nothing */
#endif #endif
#ifdef CALLER_SAVES_SparkHd
#define CALLER_SAVE_SparkHd SAVE_SparkHd = SparkHd;
#define CALLER_RESTORE_SparkHd SparkHd = SAVE_SparkHd;
#else
#define CALLER_SAVE_SparkHd /* nothing */
#define CALLER_RESTORE_SparkHd /* nothing */
#endif
#ifdef CALLER_SAVES_SparkTl
#define CALLER_SAVE_SparkTl SAVE_SparkTl = SparkTl;
#define CALLER_RESTORE_SparkTl SparkTl = SAVE_SparkTl;
#else
#define CALLER_SAVE_SparkTl /* nothing */
#define CALLER_RESTORE_SparkTl /* nothing */
#endif
#ifdef CALLER_SAVES_SparkBase
#define CALLER_SAVE_SparkBase SAVE_SparkBase = SparkBase;
#define CALLER_RESTORE_SparkBase SparkBase = SAVE_SparkBase;
#else
#define CALLER_SAVE_SparkBase /* nothing */
#define CALLER_RESTORE_SparkBase /* nothing */
#endif
#ifdef CALLER_SAVES_SparkLim
#define CALLER_SAVE_SparkLim SAVE_SparkLim = SparkLim;
#define CALLER_RESTORE_SparkLim SparkLim = SAVE_SparkLim;
#else
#define CALLER_SAVE_SparkLim /* nothing */
#define CALLER_RESTORE_SparkLim /* nothing */
#endif
#endif /* IN_STG_CODE */ #endif /* IN_STG_CODE */
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
...@@ -545,7 +617,11 @@ GLOBAL_REG_DECL(bdescr *,CurrentNursery,REG_CurrentNursery) ...@@ -545,7 +617,11 @@ GLOBAL_REG_DECL(bdescr *,CurrentNursery,REG_CurrentNursery)
CALLER_SAVE_Hp \ CALLER_SAVE_Hp \
CALLER_SAVE_HpLim \ CALLER_SAVE_HpLim \
CALLER_SAVE_CurrentTSO \ CALLER_SAVE_CurrentTSO \
CALLER_SAVE_CurrentNursery CALLER_SAVE_CurrentNursery \
CALLER_SAVE_SparkHd \
CALLER_SAVE_SparkTl \
CALLER_SAVE_SparkBase \
CALLER_SAVE_SparkLim
#define CALLER_RESTORE_USER \ #define CALLER_RESTORE_USER \
CALLER_RESTORE_R1 \ CALLER_RESTORE_R1 \
...@@ -572,7 +648,11 @@ GLOBAL_REG_DECL(bdescr *,CurrentNursery,REG_CurrentNursery) ...@@ -572,7 +648,11 @@ GLOBAL_REG_DECL(bdescr *,CurrentNursery,REG_CurrentNursery)
CALLER_RESTORE_Hp \ CALLER_RESTORE_Hp \
CALLER_RESTORE_HpLim \ CALLER_RESTORE_HpLim \
CALLER_RESTORE_CurrentTSO \ CALLER_RESTORE_CurrentTSO \
CALLER_RESTORE_CurrentNursery CALLER_RESTORE_CurrentNursery \
CALLER_RESTORE_SparkHd \
CALLER_RESTORE_SparkTl \
CALLER_RESTORE_SparkBase \
CALLER_RESTORE_SparkLim
#else /* not IN_STG_CODE */ #else /* not IN_STG_CODE */
......
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: Rts.h,v 1.9 1999/11/09 15:47:08 simonmar Exp $ * $Id: Rts.h,v 1.10 2000/01/12 15:15:17 simonmar Exp $
* *
* (c) The GHC Team, 1998-1999 * (c) The GHC Team, 1998-1999
* *
...@@ -47,10 +47,22 @@ typedef enum { ...@@ -47,10 +47,22 @@ typedef enum {
Assertions and Debuggery Assertions and Debuggery
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
#ifndef DEBUG #ifdef DEBUG
#define IF_DEBUG(c,s) if (RtsFlags.DebugFlags.c) { s; }
#else
#define IF_DEBUG(c,s) doNothing() #define IF_DEBUG(c,s) doNothing()
#endif
#if defined(GRAN) && defined(DEBUG)
#define IF_GRAN_DEBUG(c,s) if (RtsFlags.GranFlags.Debug.c) { s; }
#else #else
#define IF_DEBUG(c,s) if (RtsFlags.DebugFlags.c) { s; } #define IF_GRAN_DEBUG(c,s) doNothing()
#endif
#if defined(PAR) && defined(DEBUG)
#define IF_PAR_DEBUG(c,s) if (RtsFlags.ParFlags.Debug.c) { s; }
#else
#define IF_PAR_DEBUG(c,s) doNothing()
#endif #endif
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
......
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: RtsFlags.c,v 1.21 1999/11/29 12:02:44 keithw Exp $ * $Id: RtsFlags.c,v 1.22 2000/01/12 15:15:17 simonmar Exp $
* *
* (c) The AQUA Project, Glasgow University, 1994-1997 * (c) The AQUA Project, Glasgow University, 1994-1997
* (c) The GHC Team, 1998-1999 * (c) The GHC Team, 1998-1999
...@@ -103,19 +103,22 @@ void initRtsFlagsDefaults(void) ...@@ -103,19 +103,22 @@ void initRtsFlagsDefaults(void)
#endif #endif
RtsFlags.ConcFlags.ctxtSwitchTime = CS_MIN_MILLISECS; /* In milliseconds */ RtsFlags.ConcFlags.ctxtSwitchTime = CS_MIN_MILLISECS; /* In milliseconds */
#ifdef SMP #ifdef SMP
RtsFlags.ConcFlags.nNodes = 1; RtsFlags.ParFlags.nNodes = 1;
#endif #endif
#ifdef PAR #ifdef PAR
RtsFlags.ParFlags.parallelStats = rtsFalse; RtsFlags.ParFlags.parallelStats = rtsFalse;
RtsFlags.ParFlags.granSimStats = rtsFalse; RtsFlags.ParFlags.granSimStats = rtsFalse;
RtsFlags.ParFlags.granSimStats_Binary = rtsFalse; RtsFlags.ParFlags.granSimStats_Binary = rtsFalse;
RtsFlags.ParFlags.outputDisabled = rtsFalse; RtsFlags.ParFlags.outputDisabled = rtsFalse;
RtsFlags.ParFlags.packBufferSize = 1024; RtsFlags.ParFlags.packBufferSize = 1024;
#endif
#if defined(PAR) || defined(SMP)
RtsFlags.ParFlags.maxLocalSparks = 4096; RtsFlags.ParFlags.maxLocalSparks = 4096;
#endif /* PAR */ #endif
#ifdef GRAN #ifdef GRAN
RtsFlags.GranFlags.granSimStats = rtsFalse; RtsFlags.GranFlags.granSimStats = rtsFalse;
...@@ -281,6 +284,9 @@ usage_text[] = { ...@@ -281,6 +284,9 @@ usage_text[] = {
" -qb Enable binary activity profile (output file /tmp/<program>.gb)", " -qb Enable binary activity profile (output file /tmp/<program>.gb)",
" -Q<size> Set pack-buffer size (default: 1024)", " -Q<size> Set pack-buffer size (default: 1024)",
# endif # endif
# if defined(SMP) || defined(PAR)
" -e<n> Maximum number of outstanding local sparks (default: 4096)",
#endif
# ifdef PAR # ifdef PAR
" -d Turn on PVM-ish debugging", " -d Turn on PVM-ish debugging",
" -O Disable output for performance measurement", " -O Disable output for performance measurement",
...@@ -354,8 +360,7 @@ setupRtsFlags(int *argc, char *argv[], int *rts_argc, char *rts_argv[]) ...@@ -354,8 +360,7 @@ setupRtsFlags(int *argc, char *argv[], int *rts_argc, char *rts_argv[])
for (arg = 0; arg < *rts_argc; arg++) { for (arg = 0; arg < *rts_argc; arg++) {
if (rts_argv[arg][0] != '-') { if (rts_argv[arg][0] != '-') {
fflush(stdout); fflush(stdout);
fprintf(stderr, "setupRtsFlags: Unexpected RTS argument: %s\n", prog_belch("unexpected RTS argument: %s", rts_argv[arg]);
rts_argv[arg]);
error = rtsTrue; error = rtsTrue;
} else { } else {
...@@ -373,7 +378,7 @@ setupRtsFlags(int *argc, char *argv[], int *rts_argc, char *rts_argv[]) ...@@ -373,7 +378,7 @@ setupRtsFlags(int *argc, char *argv[], int *rts_argc, char *rts_argv[])
# define TICKY_BUILD_ONLY(x) x # define TICKY_BUILD_ONLY(x) x
#else #else
# define TICKY_BUILD_ONLY(x) \ # define TICKY_BUILD_ONLY(x) \
fprintf(stderr, "setupRtsFlags: GHC not built for: ticky-ticky stats\n"); \ prog_belch("GHC not built for: ticky-ticky stats"); \
error = rtsTrue; error = rtsTrue;
#endif #endif
...@@ -381,7 +386,7 @@ error = rtsTrue; ...@@ -381,7 +386,7 @@ error = rtsTrue;
# define COST_CENTRE_USING_BUILD_ONLY(x) x # define COST_CENTRE_USING_BUILD_ONLY(x) x
#else #else
# define COST_CENTRE_USING_BUILD_ONLY(x) \ # define COST_CENTRE_USING_BUILD_ONLY(x) \
fprintf(stderr, "setupRtsFlags: GHC not built for: -prof or -parallel\n"); \ prog_belch("GHC not built for: -prof or -parallel"); \
error = rtsTrue; error = rtsTrue;
#endif #endif
...@@ -389,7 +394,15 @@ error = rtsTrue; ...@@ -389,7 +394,15 @@ error = rtsTrue;
# define PROFILING_BUILD_ONLY(x) x # define PROFILING_BUILD_ONLY(x) x
#else #else
# define PROFILING_BUILD_ONLY(x) \ # define PROFILING_BUILD_ONLY(x) \
fprintf(stderr, "setupRtsFlags: GHC not built for: -prof\n"); \ prog_belch("GHC not built for: -prof"); \
error = rtsTrue;
#endif
#ifdef SMP
# define SMP_BUILD_ONLY(x) x
#else
# define SMP_BUILD_ONLY(x) \
prog_belch("GHC not built for: -parallel"); \
error = rtsTrue; error = rtsTrue;
#endif #endif
...@@ -397,7 +410,15 @@ error = rtsTrue; ...@@ -397,7 +410,15 @@ error = rtsTrue;
# define PAR_BUILD_ONLY(x) x # define PAR_BUILD_ONLY(x) x
#else #else
# define PAR_BUILD_ONLY(x) \ # define PAR_BUILD_ONLY(x) \
fprintf(stderr, "setupRtsFlags: GHC not built for: -parallel\n"); \ prog_belch("GHC not built for: -parallel"); \
error = rtsTrue;
#endif
#if defined(SMP) || defined(PAR)
# define PAR_OR_SMP_BUILD_ONLY(x) x
#else
# define PAR_OR_SMP_BUILD_ONLY(x) \
prog_belch("GHC not built for: -parallel or -smp"); \
error = rtsTrue; error = rtsTrue;
#endif #endif
...@@ -405,7 +426,7 @@ error = rtsTrue; ...@@ -405,7 +426,7 @@ error = rtsTrue;
# define GRAN_BUILD_ONLY(x) x # define GRAN_BUILD_ONLY(x) x
#else #else
# define GRAN_BUILD_ONLY(x) \ # define GRAN_BUILD_ONLY(x) \
fprintf(stderr, "setupRtsFlags: GHC not built for: -gransim\n"); \ prog_belch("GHC not built for: -gransim"); \
error = rtsTrue; error = rtsTrue;
#endif #endif
...@@ -580,8 +601,7 @@ error = rtsTrue; ...@@ -580,8 +601,7 @@ error = rtsTrue;
RtsFlags.ProfFlags.doHeapProfile = HEAP_BY_CLOSURE_TYPE; RtsFlags.ProfFlags.doHeapProfile = HEAP_BY_CLOSURE_TYPE;
break; break;
default: default:
fprintf(stderr, "Invalid heap profile option: %s\n", prog_belch("invalid heap profile option: %s",rts_argv[arg]);
rts_argv[arg]);
error = rtsTrue; error = rtsTrue;
} }
#else #else
...@@ -620,8 +640,7 @@ error = rtsTrue; ...@@ -620,8 +640,7 @@ error = rtsTrue;
} }
break; break;
default: default:
fprintf(stderr, "Invalid heap profile option: %s\n", prog_belch("invalid heap profile option: %s",rts_argv[arg]);
rts_argv[arg]);
error = rtsTrue; error = rtsTrue;
} }
) )
...@@ -634,41 +653,43 @@ error = rtsTrue; ...@@ -634,41 +653,43 @@ error = rtsTrue;
case CCchar: case CCchar:
max_cc_no = (hash_t) decode(rts_argv[arg]+3); max_cc_no = (hash_t) decode(rts_argv[arg]+3);
if (max_cc_no == 0) { if (max_cc_no == 0) {
fprintf(stderr, "Bad number of cost centres %s\n", rts_argv[arg]); prog_belch("bad number of cost centres %s", rts_argv[arg]);
error = rtsTrue; error = rtsTrue;
} }
break; break;
case MODchar: case MODchar:
max_mod_no = (hash_t) decode(rts_argv[arg]+3); max_mod_no = (hash_t) decode(rts_argv[arg]+3);
if (max_mod_no == 0) { if (max_mod_no == 0) {
fprintf(stderr, "Bad number of modules %s\n", rts_argv[arg]); prog_belch("bad number of modules %s", rts_argv[arg]);
error = rtsTrue; error = rtsTrue;
} }
break; break;
case GRPchar: case GRPchar:
max_grp_no = (hash_t) decode(rts_argv[arg]+3); max_grp_no = (hash_t) decode(rts_argv[arg]+3);
if (max_grp_no == 0) { if (max_grp_no == 0) {
fprintf(stderr, "Bad number of groups %s\n", rts_argv[arg]); prog_belch("bad number of groups %s", rts_argv[arg]);
error = rtsTrue; error = rtsTrue;
} }
break; break;
case DESCRchar: case DESCRchar:
max_descr_no = (hash_t) decode(rts_argv[arg]+3); max_descr_no = (hash_t) decode(rts_argv[arg]+3);
if (max_descr_no == 0) { if (max_descr_no == 0) {
fprintf(stderr, "Bad number of closure descriptions %s\n", rts_argv[arg]); prog_belch("bad number of closure descriptions %s",
rts_argv[arg]);
error = rtsTrue; error = rtsTrue;
} }
break; break;
case TYPEchar: case TYPEchar:
max_type_no = (hash_t) decode(rts_argv[arg]+3); max_type_no = (hash_t) decode(rts_argv[arg]+3);
if (max_type_no == 0) { if (max_type_no == 0) {
fprintf(stderr, "Bad number of type descriptions %s\n", rts_argv[arg]); prog_belch("bad number of type descriptions %s",
rts_argv[arg]);
error = rtsTrue; error = rtsTrue;
} }
break; break;
default: default:
fprintf(stderr, "Invalid index table size option: %s\n", prog_belch("invalid index table size option: %s",
rts_argv[arg]); rts_argv[arg]);
error = rtsTrue; error = rtsTrue;
} }
) break; ) break;
...@@ -684,8 +705,9 @@ error = rtsTrue; ...@@ -684,8 +705,9 @@ error = rtsTrue;
if (! left || ! right || if (! left || ! right ||
strrchr(rts_argv[arg], '{') != left || strrchr(rts_argv[arg], '{') != left ||
strchr(rts_argv[arg], '}') != right) { strchr(rts_argv[arg], '}') != right) {
fprintf(stderr, "Invalid heap profiling selection bracketing\n %s\n", rts_argv[arg]); prog_belch("invalid heap profiling selection bracketing: %s",
error = rtsTrue; rts_argv[arg]);
error = rtsTrue;
} else { } else {
*right = '\0'; *right = '\0';
switch (rts_argv[arg][1]) { switch (rts_argv[arg][1]) {
...@@ -730,27 +752,26 @@ error = rtsTrue; ...@@ -730,27 +752,26 @@ error = rtsTrue;
#ifdef SMP #ifdef SMP
case 'N': case 'N':
SMP_BUILD_ONLY(
if (rts_argv[arg][2] != '\0') { if (rts_argv[arg][2] != '\0') {
RtsFlags.ConcFlags.nNodes RtsFlags.ParFlags.nNodes
= strtol(rts_argv[arg]+2, (char **) NULL, 10); = strtol(rts_argv[arg]+2, (char **) NULL, 10);
if (RtsFlags.ConcFlags.nNodes <= 0) { if (RtsFlags.ParFlags.nNodes <= 0) {
fprintf(stderr, "setupRtsFlags: bad value for -N\n"); prog_belch("bad value for -N");
error = rtsTrue; error = rtsTrue;
} }
} }
break; ) break;
#endif #endif
/* =========== PARALLEL =========================== */ /* =========== PARALLEL =========================== */
case 'e': case 'e':
PAR_BUILD_ONLY( PAR_OR_SMP_BUILD_ONLY(
if (rts_argv[arg][2] != '\0') { /* otherwise, stick w/ the default */ if (rts_argv[arg][2] != '\0') {
RtsFlags.ParFlags.maxLocalSparks RtsFlags.ParFlags.maxLocalSparks
= strtol(rts_argv[arg]+2, (char **) NULL, 10); = strtol(rts_argv[arg]+2, (char **) NULL, 10);
if (RtsFlags.ParFlags.maxLocalSparks <= 0) { if (RtsFlags.ParFlags.maxLocalSparks <= 0) {
fprintf(stderr, "setupRtsFlags: bad value for -e\n"); prog_belch("bad value for -e");
error = rtsTrue; error = rtsTrue;
} }
} }
) break; ) break;
...@@ -783,8 +804,8 @@ error = rtsTrue; ...@@ -783,8 +804,8 @@ error = rtsTrue;
if (rts_argv[arg][2] != '\0') { if (rts_argv[arg][2] != '\0') {
RtsFlags.ParFlags.packBufferSize = decode(rts_argv[arg]+2); RtsFlags.ParFlags.packBufferSize = decode(rts_argv[arg]+2);
} else { } else {
fprintf(stderr, "setupRtsFlags: missing size of PackBuffer (for -Q)\n"); prog_belch("missing size of PackBuffer (for -Q)");
error = rtsTrue; error = rtsTrue;
} }
) break; ) break;
...@@ -813,7 +834,7 @@ error = rtsTrue; ...@@ -813,7 +834,7 @@ error = rtsTrue;
case 'x': /* Extend the argument space */ case 'x': /* Extend the argument space */
switch(rts_argv[arg][2]) { switch(rts_argv[arg][2]) {
case '\0': case '\0':
fprintf(stderr, "setupRtsFlags: Incomplete RTS option: %s\n",rts_argv[arg]); prog_belch("incomplete RTS option: %s",rts_argv[arg]);
error = rtsTrue; error = rtsTrue;
break; break;
...@@ -825,7 +846,7 @@ error = rtsTrue; ...@@ -825,7 +846,7 @@ error = rtsTrue;
/* The option prefix '-xx' is reserved for future extension. KSW 1999-11. */ /* The option prefix '-xx' is reserved for future extension. KSW 1999-11. */
default: default:
fprintf(stderr, "setupRtsFlags: Unknown RTS option: %s\n",rts_argv[arg]); prog_belch("unknown RTS option: %s",rts_argv[arg]);
error = rtsTrue; error = rtsTrue;
break; break;
} }
...@@ -833,7 +854,7 @@ error = rtsTrue; ...@@ -833,7 +854,7 @@ error = rtsTrue;
/* =========== OH DEAR ============================ */ /* =========== OH DEAR ============================ */
default: default:
fprintf(stderr, "setupRtsFlags: Unknown RTS option: %s\n",rts_argv[arg]); prog_belch("unknown RTS option: %s",rts_argv[arg]);
error = rtsTrue; error = rtsTrue;
break; break;
} }
...@@ -844,10 +865,9 @@ error = rtsTrue; ...@@ -844,10 +865,9 @@ error = rtsTrue;