[project @ 2005-03-27 13:41:13 by panne]
authorpanne <unknown>
Sun, 27 Mar 2005 13:41:19 +0000 (13:41 +0000)
committerpanne <unknown>
Sun, 27 Mar 2005 13:41:19 +0000 (13:41 +0000)
* Some preprocessors don't like the C99/C++ '//' comments after a
  directive, so use '/* */' instead. For consistency, a lot of '//' in
  the include files were converted, too.

* UnDOSified libraries/base/cbits/runProcess.c.

* My favourite sport: Killed $Id$s.

53 files changed:
ghc/includes/Block.h
ghc/includes/Bytecodes.h
ghc/includes/ClosureMacros.h
ghc/includes/ClosureTypes.h
ghc/includes/Closures.h
ghc/includes/Cmm.h
ghc/includes/Constants.h
ghc/includes/GranSim.h
ghc/includes/Hooks.h
ghc/includes/HsFFI.h
ghc/includes/InfoTables.h
ghc/includes/Linker.h
ghc/includes/MachRegs.h
ghc/includes/Makefile
ghc/includes/Parallel.h
ghc/includes/README
ghc/includes/Regs.h
ghc/includes/RtsExternal.h
ghc/includes/RtsFlags.h
ghc/includes/RtsMessages.h
ghc/includes/RtsTypes.h
ghc/includes/SMP.h
ghc/includes/STM.h
ghc/includes/SchedAPI.h
ghc/includes/Signals.h
ghc/includes/Stg.h
ghc/includes/StgFun.h
ghc/includes/StgProf.h
ghc/includes/StgTicky.h
ghc/includes/Storage.h
ghc/includes/TSO.h
ghc/includes/TailCalls.h
ghc/includes/Updates.h
ghc/includes/mkDerivedConstants.c
ghc/rts/Apply.h
ghc/rts/Arena.h
ghc/rts/AutoApply.h
ghc/rts/Capability.h
ghc/rts/GC.c
ghc/rts/HeapStackCheck.cmm
ghc/rts/Interpreter.h
ghc/rts/Linker.c
ghc/rts/MBlock.h
ghc/rts/ProfHeap.c
ghc/rts/Profiling.c
ghc/rts/RetainerProfile.c
ghc/rts/RetainerSet.c
ghc/rts/RetainerSet.h
ghc/rts/RtsFlags.c
ghc/rts/RtsUtils.h
ghc/rts/Sanity.c
ghc/rts/Stats.h
ghc/rts/parallel/Dist.h

index 37d17a5..ea2d4bc 100644 (file)
@@ -1,5 +1,4 @@
 /* -----------------------------------------------------------------------------
- * $Id: Block.h,v 1.18 2005/02/10 13:02:00 simonmar Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -143,7 +142,7 @@ INLINE_HEADER bdescr *Bdescr(StgPtr p)
 
 
 #ifndef CMINUSMINUS 
-// to the end...
+/* to the end... */
 
 /* Double-linked block lists: --------------------------------------------- */
 
index b6e05dd..f9a5182 100644 (file)
@@ -1,5 +1,4 @@
 /* -----------------------------------------------------------------------------
- * $Id: Bytecodes.h,v 1.10 2004/09/07 10:10:07 simonmar Exp $
  *
  * (c) The GHC Team, 1998-2002
  *
index 12023a5..11636b8 100644 (file)
 #define SET_PROF_HDR(c,ccs_)            \
         ((c)->header.prof.ccs = ccs_,   \
         LDV_RECORD_CREATE((c)))
-#endif  // DEBUG_RETAINER
+#endif /* DEBUG_RETAINER */
 #define SET_STATIC_PROF_HDR(ccs_)       \
         prof : { ccs : (CostCentreStack *)ccs_, hp : { rs : NULL } },
 #else
index 3e2b7cf..243111e 100644 (file)
@@ -1,5 +1,4 @@
 /* ----------------------------------------------------------------------------
- * $Id: ClosureTypes.h,v 1.20 2005/02/10 13:02:02 simonmar Exp $
  * 
  * (c) The GHC Team, 1998-1999
  *
index 7cb4a52..a044731 100644 (file)
@@ -21,8 +21,8 @@
 typedef struct {
   CostCentreStack *ccs;
   union {
-    struct _RetainerSet *rs;  // Retainer Set
-    StgWord ldvw;             // Lag/Drag/Void Word
+    struct _RetainerSet *rs;  /* Retainer Set */
+    StgWord ldvw;             /* Lag/Drag/Void Word */
   } hp;
 } StgProfHeader;
 
@@ -79,14 +79,14 @@ typedef struct {
     StgClosure *payload[FLEXIBLE_ARRAY];
 } StgPAP;
 
-// AP closures have the same layout, for convenience
+/* AP closures have the same layout, for convenience */
 typedef StgPAP StgAP;
 
 typedef struct {
     StgHeader   header;
-    StgWord     size;                    // number of words in payload
+    StgWord     size;                    /* number of words in payload */
     StgClosure *fun;
-    StgClosure *payload[FLEXIBLE_ARRAY]; // contains a chunk of *stack*
+    StgClosure *payload[FLEXIBLE_ARRAY]; /* contains a chunk of *stack* */
 } StgAP_STACK;
 
 typedef struct {
@@ -194,13 +194,13 @@ typedef struct _StgDeadWeak {     /* Weak v */
 
 typedef struct {
     StgHeader      header;
-    StgArrWords   *instrs;     // a pointer to an ArrWords
-    StgArrWords   *literals;   // a pointer to an ArrWords
-    StgMutArrPtrs *ptrs;       // a pointer to a  MutArrPtrs
-    StgArrWords   *itbls;      // a pointer to an ArrWords
-    StgHalfWord   arity;        // arity of this BCO
-    StgHalfWord   size;         // size of this BCO (in words)
-    StgWord       bitmap[FLEXIBLE_ARRAY];  // an StgLargeBitmap
+    StgArrWords   *instrs;     /* a pointer to an ArrWords */
+    StgArrWords   *literals;   /* a pointer to an ArrWords */
+    StgMutArrPtrs *ptrs;       /* a pointer to a  MutArrPtrs */
+    StgArrWords   *itbls;      /* a pointer to an ArrWords */
+    StgHalfWord   arity;        /* arity of this BCO */
+    StgHalfWord   size;         /* size of this BCO (in words) */
+    StgWord       bitmap[FLEXIBLE_ARRAY];  /* an StgLargeBitmap */
 } StgBCO;
 
 #define BCO_BITMAP(bco)      ((StgLargeBitmap *)((StgBCO *)(bco))->bitmap)
@@ -317,8 +317,8 @@ typedef struct {
   StgTVarWaitQueue          *first_wait_queue_entry;
 } StgTVar;
 
-// new_value == expected_value for read-only accesses
-// new_value is a StgTVarWaitQueue entry when trec in state TREC_WAITING
+/* new_value == expected_value for read-only accesses */
+/* new_value is a StgTVarWaitQueue entry when trec in state TREC_WAITING */
 typedef struct {
   StgTVar                   *tvar;
   StgClosure                *expected_value;
@@ -335,12 +335,12 @@ typedef struct StgTRecChunk_ {
 } StgTRecChunk;
 
 typedef enum { 
-  TREC_ACTIVE,        // Transaction in progress, outcome undecided
-  TREC_CANNOT_COMMIT, // Transaction in progress, inconsistent writes performed
-  TREC_MUST_ABORT,    // Transaction in progress, inconsistent / out of date reads
-  TREC_COMMITTED,     // Transaction has committed, now updating tvars
-  TREC_ABORTED,       // Transaction has aborted, now reverting tvars
-  TREC_WAITING,       // Transaction currently waiting
+  TREC_ACTIVE,        /* Transaction in progress, outcome undecided */
+  TREC_CANNOT_COMMIT, /* Transaction in progress, inconsistent writes performed */
+  TREC_MUST_ABORT,    /* Transaction in progress, inconsistent / out of date reads */
+  TREC_COMMITTED,     /* Transaction has committed, now updating tvars */
+  TREC_ABORTED,       /* Transaction has aborted, now reverting tvars */
+  TREC_WAITING,       /* Transaction currently waiting */
 } TRecState;
 
 typedef struct StgTRecHeader_ {
index 240b16a..21c8257 100644 (file)
 #ifndef CMM_H
 #define CMM_H
 
-// In files that are included into both C and C-- (and perhaps
-// Haskell) sources, we sometimes need to conditionally compile bits
-// depending on the language.  CMINUSMINUS==1 in .cmm sources:
+/*
+ * In files that are included into both C and C-- (and perhaps
+ * Haskell) sources, we sometimes need to conditionally compile bits
+ * depending on the language.  CMINUSMINUS==1 in .cmm sources:
+ */
 #define CMINUSMINUS 1
 
 #include "ghcconfig.h"
 #define W_SHIFT 4
 #endif
 
-// Converting quantities of words to bytes
+/* Converting quantities of words to bytes */
 #define WDS(n) ((n)*SIZEOF_W)
 
-// Converting quantities of bytes to words
-// NB. these work on *unsigned* values only
+/*
+ * Converting quantities of bytes to words
+ * NB. these work on *unsigned* values only
+ */
 #define BYTES_TO_WDS(n) ((n) / SIZEOF_W)
 #define ROUNDUP_BYTES_TO_WDS(n) (((n) + SIZEOF_W - 1) / SIZEOF_W)
 
-// TO_W_(n) converts n to W_ type from a smaller type
+/* TO_W_(n) converts n to W_ type from a smaller type */
 #if SIZEOF_W == 4
 #define TO_W_(x) %sx32(x)
 #define HALF_W_(x) %lobits16(x)
 #define DEBUG_ONLY(s) /* nothing */
 #endif
 
-//
-// The IF_DEBUG macro is useful for debug messages that depend on one
-// of the RTS debug options.  For example:
-// 
-//   IF_DEBUG(RtsFlags_DebugFlags_apply,
-//      foreign "C" fprintf(stderr, stg_ap_0_ret_str));
-//
-// Note the syntax is slightly different to the C version of this macro.
-//
+/*
+ * The IF_DEBUG macro is useful for debug messages that depend on one
+ * of the RTS debug options.  For example:
+ * 
+ *   IF_DEBUG(RtsFlags_DebugFlags_apply,
+ *      foreign "C" fprintf(stderr, stg_ap_0_ret_str));
+ *
+ * Note the syntax is slightly different to the C version of this macro.
+ */
 #ifdef DEBUG
 #define IF_DEBUG(c,s)  if (RtsFlags_DebugFlags_##c(RtsFlags)) { s; }
 #else
 #include "ClosureTypes.h"
 #include "StgFun.h"
 
-//
-// Need MachRegs, because some of the RTS code is conditionally
-// compiled based on REG_R1, REG_R2, etc.
-//
+/*
+ * Need MachRegs, because some of the RTS code is conditionally
+ * compiled based on REG_R1, REG_R2, etc.
+ */
 #define STOLEN_X86_REGS 4
 #include "MachRegs.h"
 
 
 #undef BLOCK_SIZE
 #undef MBLOCK_SIZE
-#include "Block.h"  // For Bdescr()
+#include "Block.h"  /* For Bdescr() */
 
 
-// Can't think of a better place to put this.
+/* Can't think of a better place to put this. */
 #if SIZEOF_mp_limb_t != SIZEOF_VOID_P
 #error mp_limb_t != StgWord: assumptions in PrimOps.cmm are now false
 #endif
    Allocation and garbage collection
    ------------------------------------------------------------------------- */
 
-// ALLOC_PRIM is for allocating memory on the heap for a primitive
-// object.  It is used all over PrimOps.cmm.
-//
-// We make the simplifying assumption that the "admin" part of a
-// primitive closure is just the header when calculating sizes for
-// ticky-ticky.  It's not clear whether eg. the size field of an array
-// should be counted as "admin", or the various fields of a BCO.
-//
+/*
+ * ALLOC_PRIM is for allocating memory on the heap for a primitive
+ * object.  It is used all over PrimOps.cmm.
+ *
+ * We make the simplifying assumption that the "admin" part of a
+ * primitive closure is just the header when calculating sizes for
+ * ticky-ticky.  It's not clear whether eg. the size field of an array
+ * should be counted as "admin", or the various fields of a BCO.
+ */
 #define ALLOC_PRIM(bytes,liveness,reentry)                     \
    HP_CHK_GEN_TICKY(bytes,liveness,reentry);                   \
    TICK_ALLOC_PRIM(SIZEOF_StgHeader,bytes-SIZEOF_StgHeader,0); \
    CCCS_ALLOC(bytes);
 
-// CCS_ALLOC wants the size in words, because ccs->mem_alloc is in words
+/* CCS_ALLOC wants the size in words, because ccs->mem_alloc is in words */
 #define CCCS_ALLOC(__alloc) CCS_ALLOC(BYTES_TO_WDS(__alloc), W_[CCCS])
 
 #define HP_CHK_GEN_TICKY(alloc,liveness,reentry)       \
    Closures
    -------------------------------------------------------------------------- */
 
-// The offset of the payload of an array
+/* The offset of the payload of an array */
 #define BYTE_ARR_CTS(arr)  ((arr) + SIZEOF_StgArrWords)
 
-// Getting/setting the info pointer of a closure
+/* Getting/setting the info pointer of a closure */
 #define SET_INFO(p,info) StgHeader_info(p) = info
 #define GET_INFO(p) StgHeader_info(p)
 
-// Determine the size of an ordinary closure from its info table
+/* Determine the size of an ordinary closure from its info table */
 #define sizeW_fromITBL(itbl) \
   SIZEOF_StgHeader + WDS(%INFO_PTRS(itbl)) + WDS(%INFO_NPTRS(itbl))
 
-// NB. duplicated from InfoTables.h!
+/* NB. duplicated from InfoTables.h! */
 #define BITMAP_SIZE(bitmap) ((bitmap) & BITMAP_SIZE_MASK)
 #define BITMAP_BITS(bitmap) ((bitmap) >> BITMAP_BITS_SHIFT)
 
-// Debugging macros
+/* Debugging macros */
 #define LOOKS_LIKE_INFO_PTR(p)                         \
    ((p) != NULL &&                                     \
      (TO_W_(%INFO_TYPE(%STD_INFO(p))) != INVALID_OBJECT) &&    \
 
 #define LOOKS_LIKE_CLOSURE_PTR(p) (LOOKS_LIKE_INFO_PTR(GET_INFO(p)))
 
-//
-// The layout of the StgFunInfoExtra part of an info table changes
-// depending on TABLES_NEXT_TO_CODE.  So we define field access
-// macros which use the appropriate version here:
-//
+/*
+ * The layout of the StgFunInfoExtra part of an info table changes
+ * depending on TABLES_NEXT_TO_CODE.  So we define field access
+ * macros which use the appropriate version here:
+ */
 #ifdef TABLES_NEXT_TO_CODE
-        // when TABLES_NEXT_TO_CODE, slow_apply is stored as an offset
-        // instead of the normal pointer.
+/*
+ * when TABLES_NEXT_TO_CODE, slow_apply is stored as an offset
+ * instead of the normal pointer.
+ */
         
 #define StgFunInfoExtra_slow_apply(fun_info)    \
         (StgFunInfoExtraRev_slow_apply_offset(fun_info)    \
 
 #define TICK_HISTO(histo,n) TICK_HISTO_BY(histo,n,1)
 
-// An unboxed tuple with n components.
+/* An unboxed tuple with n components. */
 #define TICK_RET_UNBOXED_TUP(n)                        \
   TICK_BUMP(RET_UNBOXED_TUP_ctr++);            \
   TICK_HISTO(RET_UNBOXED_TUP,n)
 
-// A slow call with n arguments.  In the unevald case, this call has
-// already been counted once, so don't count it again.
+/*
+ * A slow call with n arguments.  In the unevald case, this call has
+ * already been counted once, so don't count it again.
+ */
 #define TICK_SLOW_CALL(n)                      \
   TICK_BUMP(SLOW_CALL_ctr);                    \
   TICK_HISTO(SLOW_CALL,n)
 
-// This slow call was found to be to an unevaluated function; undo the
-// ticks we did in TICK_SLOW_CALL.
+/*
+ * This slow call was found to be to an unevaluated function; undo the
+ * ticks we did in TICK_SLOW_CALL.
+ */
 #define TICK_SLOW_CALL_UNEVALD(n)              \
   TICK_BUMP(SLOW_CALL_UNEVALD_ctr);            \
   TICK_BUMP_BY(SLOW_CALL_ctr,-1);              \
   TICK_HISTO_BY(SLOW_CALL,n,-1);
 
-// Updating a closure with a new CON
+/* Updating a closure with a new CON */
 #define TICK_UPD_CON_IN_NEW(n)                 \
   TICK_BUMP(UPD_CON_IN_NEW_ctr);               \
   TICK_HISTO(UPD_CON_IN_NEW,n)
     TICK_BUMP(ALLOC_HEAP_ctr);                 \
     TICK_BUMP_BY(ALLOC_HEAP_tot,n)
 
-#endif // CMM_H
+#endif /* CMM_H */
index b4d66cb..e98f25f 100644 (file)
@@ -1,5 +1,4 @@
 /* ----------------------------------------------------------------------------
- * $Id: Constants.h,v 1.28 2005/02/10 13:02:03 simonmar Exp $
  *
  * (c) The GHC Team, 1998-2002
  *
 #define LDV_LAST_MASK           0x00007FFF
 #define LDV_STATE_CREATE        0x00000000
 #define LDV_STATE_USE           0x40000000
-#endif  // SIZEOF_VOID_P
+#endif /* SIZEOF_VOID_P */
 
 /* -----------------------------------------------------------------------------
    TSO related constants
index 32f37ff..be5aa83 100644 (file)
@@ -1,7 +1,4 @@
 /*
-  Time-stamp: <Fri Mar 24 2000 23:55:42 Stardate: [-30]4554.98 hwloidl>
-  $Id: GranSim.h,v 1.4 2004/11/10 04:17:50 wolfgang Exp $
-  
   Headers for GranSim specific objects.
   
   Note that in GranSim we have one run-queue and blocking-queue for each
 
 extern StgTSO *CurrentTSO;
 
-//@node Headers for GranSim specific objects, , ,
-//@section Headers for GranSim specific objects
-
-//@menu
-//* Externs and prototypes::   
-//* Run and blocking queues::  
-//* Spark queues::             
-//* Processor related stuff::  
-//* GranSim costs::            
-//* STG called GranSim functions::  
-//* STG-called routines::      
-//@end menu
-
-//@node Externs and prototypes, Run and blocking queues, Includes, Headers for GranSim specific objects
-//@subsection Externs and prototypes
+/*
+ * @node Headers for GranSim specific objects, , ,
+ * @section Headers for GranSim specific objects
+ *
+ * @menu
+ * * Externs and prototypes::  
+ * * Run and blocking queues:: 
+ * * Spark queues::            
+ * * Processor related stuff:: 
+ * * GranSim costs::           
+ * * STG called GranSim functions::  
+ * * STG-called routines::     
+ * @end menu
+ *
+ * @node Externs and prototypes, Run and blocking queues, Includes, Headers for GranSim specific objects
+ * @subsection Externs and prototypes
+ */
 
 /* Global constants */
 extern char *gran_event_names[];
@@ -64,8 +63,10 @@ extern nat SparksAvail;     /* How many sparks are available */
 extern nat SurplusThreads;  /* How many excess threads are there */
 extern nat sparksIgnored, sparksCreated;
 
-//@node Run and blocking queues, Spark queues, Externs and prototypes, Headers for GranSim specific objects
-//@subsection Run and blocking queues
+/*
+ * @node Run and blocking queues, Spark queues, Externs and prototypes, Headers for GranSim specific objects
+ * @subsection Run and blocking queues
+ */
 
 /* declared in Schedule.c */
 extern StgTSO *run_queue_hds[], *run_queue_tls[];
@@ -80,8 +81,10 @@ extern StgTSO *ccalling_threadss[];
 #define pending_sparks_tl    pending_sparks_tls[CurrentProc]
 #define ccalling_threads     ccalling_threadss[CurrentProc]
 
-//@node Spark queues, Processor related stuff, Run and blocking queues, Headers for GranSim specific objects
-//@subsection Spark queues
+/*
+ * @node Spark queues, Processor related stuff, Run and blocking queues, Headers for GranSim specific objects
+ * @subsection Spark queues
+ */
 
 /*
   In GranSim we use a double linked list to represent spark queues.
@@ -113,22 +116,26 @@ extern rtsSparkQ pending_sparks_tls[];
 rtsSpark    *newSpark(StgClosure *node, 
                      nat name, nat gran_info, nat size_info, 
                      nat par_info, nat local);
-// void         add_to_spark_queue(rtsSpark *spark);
+/* void         add_to_spark_queue(rtsSpark *spark); */
 
-//@node Processor related stuff, GranSim costs, Spark queues, Headers for GranSim specific objects
-//@subsection Processor related stuff
+/*
+ * @node Processor related stuff, GranSim costs, Spark queues, Headers for GranSim specific objects
+ * @subsection Processor related stuff
+ */
 
 extern PEs CurrentProc;
 extern rtsTime CurrentTime[];  
 
 /* Maximum number of PEs that can be simulated */
-#define MAX_PROC             32 /* (BITS_IN(StgWord))  */ // ToDo: fix this!!
-//#if MAX_PROC==16 
-//#else 
-//#error MAX_PROC should be 32 on this architecture 
-//#endif 
+#define MAX_PROC             32 /* (BITS_IN(StgWord))  */ /* ToDo: fix this!! */
+/*
+#if MAX_PROC==16 
+#else 
+#error MAX_PROC should be 32 on this architecture 
+#endif
+*/
 
-// #define CurrentTSO           CurrentTSOs[CurrentProc]
+/* #define CurrentTSO           CurrentTSOs[CurrentProc] */
 
 /* Processor numbers to bitmasks and vice-versa */
 #define MainProc            0           /* Id of main processor */
@@ -148,8 +155,10 @@ extern rtsTime CurrentTime[];
 
 #define GRAN_TIME_SLICE       1000        /* max time between 2 ReSchedules */
 
-//@node GranSim costs, STG called GranSim functions, Processor related stuff, Headers for GranSim specific objects
-//@subsection GranSim costs
+/*
+ * @node GranSim costs, STG called GranSim functions, Processor related stuff, Headers for GranSim specific objects
+ * @subsection GranSim costs
+ */
 
 /* Default constants for communication (see RtsFlags on how to change them) */
 
@@ -194,8 +203,10 @@ extern rtsTime CurrentTime[];
 #define PRI_SPARK_OVERHEAD    5
 #define PRI_SCHED_OVERHEAD    5
 
-//@node STG called GranSim functions, STG-called routines, GranSim costs, Headers for GranSim specific objects
-//@subsection STG called GranSim functions
+/*
+ * @node STG called GranSim functions, STG-called routines, GranSim costs, Headers for GranSim specific objects
+ * @subsection STG called GranSim functions
+ */
 
 /* STG called GranSim functions */
 void GranSimAllocate(StgInt n);
@@ -208,8 +219,10 @@ void GranSimSparkAtAbs(rtsSpark *spark, PEs proc, StgInt identifier);
 void GranSimBlock(StgTSO *tso, PEs proc, StgClosure *node);
 
 
-//@node STG-called routines,  , STG called GranSim functions, Headers for GranSim specific objects
-//@subsection STG-called routines
+/*
+ * @node STG-called routines,  , STG called GranSim functions, Headers for GranSim specific objects
+ * @subsection STG-called routines
+ */
 
 /* Wrapped version of calls to GranSim-specific STG routines */
 
@@ -224,13 +237,13 @@ void GranSimBlock(StgTSO *tso, PEs proc, StgClosure *node);
 /* 
    ToDo: Clean up this mess of GRAN macros!!! -- HWL
 */
-// DO_GRAN_FETCH((StgClosure*)R1.p);
+/* DO_GRAN_FETCH((StgClosure*)R1.p); */
 #define GRAN_FETCH()           /* nothing */
 
 #define GRAN_FETCH_AND_RESCHEDULE(liveness,reenter)    \
           DO_GRAN_FETCH((StgClosure*)R1.p);                            \
           DO_GRAN_YIELD(liveness,ENTRY_CODE((D_)(*R1.p))); 
-// RESTORE_EVERYTHING is done implicitly before entering threaded world agian
+/* RESTORE_EVERYTHING is done implicitly before entering threaded world again */
 
 /*
   This is the only macro currently enabled;
@@ -262,11 +275,11 @@ void GranSimBlock(StgTSO *tso, PEs proc, StgClosure *node);
          }
 
 
-//                                                   YIELD(liveness,reenter)
+/*                                                   YIELD(liveness,reenter) */
 
-// GRAN_YIELD(liveness_mask); 
+/* GRAN_YIELD(liveness_mask); */
 
-// GRAN_FETCH_AND_RESCHEDULE(liveness_mask,reenter)
+/* GRAN_FETCH_AND_RESCHEDULE(liveness_mask,reenter) */
 
 #define THREAD_CONTEXT_SWITCH(liveness_mask,reenter)   \
         do { \
index a448979..38014cc 100644 (file)
@@ -1,5 +1,4 @@
 /* -----------------------------------------------------------------------------
- * $Id: Hooks.h,v 1.7 2004/02/15 13:29:44 krasimir Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
index a96cb95..70891a2 100644 (file)
@@ -1,5 +1,4 @@
 /* -----------------------------------------------------------------------------
- * $Id: HsFFI.h,v 1.20 2004/08/13 13:09:13 simonmar Exp $
  *
  * (c) The GHC Team, 2000
  *
index 8677e90..148be67 100644 (file)
@@ -1,5 +1,4 @@
 /* ----------------------------------------------------------------------------
- * $Id: InfoTables.h,v 1.35 2004/11/08 12:26:55 simonmar Exp $
  * 
  * (c) The GHC Team, 1998-2002
  *
@@ -25,8 +24,8 @@ typedef struct {
 
 #if 0 && (defined(PAR) || defined(GRAN))
 
-// CURRENTLY UNUSED
-// ToDo: use this in StgInfoTable (mutually recursive) -- HWL
+/* CURRENTLY UNUSED
+   ToDo: use this in StgInfoTable (mutually recursive) -- HWL */
 
 typedef struct {
   StgInfoTable *rbh_infoptr;     /* infoptr to the RBH  */
@@ -71,13 +70,15 @@ typedef struct {
 # endif
 
 /* see ParallelRts.h */
-// EXTFUN(RBH_entry);
-//StgClosure *convertToRBH(StgClosure *closure);
-//#if defined(GRAN)
-//void convertFromRBH(StgClosure *closure);
-//#elif defined(PAR)
-//void convertToFetchMe(StgPtr closure, globalAddr *ga);
-//#endif
+/*
+EXTFUN(RBH_entry);
+StgClosure *convertToRBH(StgClosure *closure);
+#if defined(GRAN)
+void convertFromRBH(StgClosure *closure);
+#elif defined(PAR)
+void convertToFetchMe(StgPtr closure, globalAddr *ga);
+#endif
+*/
 
 #endif
 
@@ -99,7 +100,7 @@ typedef struct {
 
 #else /* !DEBUG_CLOSURE */
 
-// There is no DEBUG-specific stuff in an info table at this time.
+/* There is no DEBUG-specific stuff in an info table at this time. */
 
 #endif /* DEBUG_CLOSURE */
 
@@ -165,19 +166,19 @@ extern StgWord16 closure_flags[];
    In these bitmaps: 0 == ptr, 1 == non-ptr.
    -------------------------------------------------------------------------- */
 
-//
-// Small bitmaps:  for a small bitmap, we store the size and bitmap in 
-// the same word, using the following macros.  If the bitmap doesn't
-// fit in a single word, we use a pointer to an StgLargeBitmap below.
-// 
+/*
+ * Small bitmaps:  for a small bitmap, we store the size and bitmap in 
+ * the same word, using the following macros.  If the bitmap doesn't
+ * fit in a single word, we use a pointer to an StgLargeBitmap below.
+ */
 #define MK_SMALL_BITMAP(size,bits) (((bits)<<BITMAP_BITS_SHIFT) | (size))
 
 #define BITMAP_SIZE(bitmap) ((bitmap) & BITMAP_SIZE_MASK)
 #define BITMAP_BITS(bitmap) ((bitmap) >> BITMAP_BITS_SHIFT)
 
-//
-// A large bitmap.
-//
+/*
+ * A large bitmap.
+ */
 typedef struct {
   StgWord size;
   StgWord bitmap[FLEXIBLE_ARRAY];
@@ -192,15 +193,17 @@ typedef struct {
    garbage-collect CAFs.
    -------------------------------------------------------------------------- */
 
-// An SRT is just an array of closure pointers:
+/* An SRT is just an array of closure pointers: */
 typedef StgClosure* StgSRT[];
 
-// Each info table refers to some subset of the closure pointers in an
-// SRT.  It does this using a pair of an StgSRT pointer and a
-// half-word bitmap.  If the half-word bitmap isn't large enough, then
-// we fall back to a large SRT, including an unbounded bitmap.  If the
-// half-word bitmap is set to all ones (0xffff), then the StgSRT
-// pointer instead points to an StgLargeSRT:
+/*
+ * Each info table refers to some subset of the closure pointers in an
+ * SRT.  It does this using a pair of an StgSRT pointer and a
+ * half-word bitmap.  If the half-word bitmap isn't large enough, then
+ * we fall back to a large SRT, including an unbounded bitmap.  If the
+ * half-word bitmap is set to all ones (0xffff), then the StgSRT
+ * pointer instead points to an StgLargeSRT:
+ */
 typedef struct StgLargeSRT_ {
     StgSRT *srt;
     StgLargeBitmap l;
@@ -210,38 +213,38 @@ typedef struct StgLargeSRT_ {
    Info Tables
    ------------------------------------------------------------------------- */
 
-//
-// Stuff describing the closure layout.  Well, actually, it might
-// contain the selector index for a THUNK_SELECTOR.  This union is one
-// word long.
-//
+/*
+ * Stuff describing the closure layout.  Well, actually, it might
+ * contain the selector index for a THUNK_SELECTOR.  This union is one
+ * word long.
+ */
 typedef union {
-    struct {                   // Heap closure payload layout:
-       StgHalfWord ptrs;       // number of pointers
-       StgHalfWord nptrs;      // number of non-pointers
+    struct {                   /* Heap closure payload layout: */
+       StgHalfWord ptrs;       /* number of pointers */
+       StgHalfWord nptrs;      /* number of non-pointers */
     } payload;
     
-    StgWord bitmap;              // word-sized bit pattern describing
-                                 //  a stack frame: see below
+    StgWord bitmap;              /* word-sized bit pattern describing */
+                                 /*  a stack frame: see below */
 
 #ifndef TABLES_NEXT_TO_CODE
-    StgLargeBitmap* large_bitmap; // pointer to large bitmap structure
+    StgLargeBitmap* large_bitmap; /* pointer to large bitmap structure */
 #else
-    StgWord large_bitmap_offset;  // offset from info table to large bitmap structure
+    StgWord large_bitmap_offset;  /* offset from info table to large bitmap structure */
 #endif
     
-    StgWord selector_offset;     // used in THUNK_SELECTORs
+    StgWord selector_offset;     /* used in THUNK_SELECTORs */
 
 } StgClosureInfo;
 
 
-//
-// The "standard" part of an info table.  Every info table has this bit.
-//
+/*
+ * The "standard" part of an info table.  Every info table has this bit.
+ */
 typedef struct _StgInfoTable {
 
 #ifndef TABLES_NEXT_TO_CODE
-    StgFunPtr       entry;     // pointer to the entry code
+    StgFunPtr       entry;     /* pointer to the entry code */
 #endif
 
 #if defined(PAR) || defined(GRAN)
@@ -251,16 +254,16 @@ typedef struct _StgInfoTable {
     StgProfInfo     prof;
 #endif
 #ifdef TICKY
-    // Ticky-specific stuff would go here.
+  /* Ticky-specific stuff would go here. */
 #endif
 #ifdef DEBUG_CLOSURE
-    // Debug-specific stuff would go here.
+  /* Debug-specific stuff would go here. */
 #endif
 
-    StgClosureInfo  layout;    // closure layout info (one word)
+    StgClosureInfo  layout;    /* closure layout info (one word) */
 
-    StgHalfWord     type;      // closure type
-    StgHalfWord     srt_bitmap;    // number of entries in SRT (or constructor tag)
+    StgHalfWord     type;      /* closure type */
+    StgHalfWord     srt_bitmap;    /* number of entries in SRT (or constructor tag) */
 
 #ifdef TABLES_NEXT_TO_CODE
     StgCode         code[FLEXIBLE_ARRAY];
@@ -284,19 +287,19 @@ typedef struct _StgInfoTable {
    -------------------------------------------------------------------------- */
 
 typedef struct _StgFunInfoExtraRev {
-    StgWord        slow_apply_offset; // apply to args on the stack
-    StgWord        bitmap;     // arg ptr/nonptr bitmap
-    StgWord        srt_offset; // pointer to the SRT table
-    StgHalfWord    fun_type;    // function type
-    StgHalfWord    arity;       // function arity
+    StgWord        slow_apply_offset; /* apply to args on the stack */
+    StgWord        bitmap;     /* arg ptr/nonptr bitmap */
+    StgWord        srt_offset; /* pointer to the SRT table */
+    StgHalfWord    fun_type;    /* function type */
+    StgHalfWord    arity;       /* function arity */
 } StgFunInfoExtraRev;
 
 typedef struct _StgFunInfoExtraFwd {
-    StgHalfWord    fun_type;    // function type
-    StgHalfWord    arity;       // function arity
-    StgSRT         *srt;       // pointer to the SRT table
-    StgWord        bitmap;     // arg ptr/nonptr bitmap
-    StgFun         *slow_apply; // apply to args on the stack
+    StgHalfWord    fun_type;    /* function type */
+    StgHalfWord    arity;       /* function arity */
+    StgSRT         *srt;       /* pointer to the SRT table */
+    StgWord        bitmap;     /* arg ptr/nonptr bitmap */
+    StgFun         *slow_apply; /* apply to args on the stack */
 } StgFunInfoExtraFwd;
 
 typedef struct {
@@ -313,16 +316,18 @@ typedef struct {
    Return info tables
    -------------------------------------------------------------------------- */
 
-// When info tables are laid out backwards, we can omit the SRT
-// pointer iff srt_bitmap is zero.
+/*
+ * When info tables are laid out backwards, we can omit the SRT
+ * pointer iff srt_bitmap is zero.
+ */
 
 typedef struct {
 #if defined(TABLES_NEXT_TO_CODE)
-    StgWord      srt_offset;   // offset to the SRT table
+    StgWord      srt_offset;   /* offset to the SRT table */
     StgInfoTable i;
 #else
     StgInfoTable i;
-    StgSRT      *srt;  // pointer to the SRT table
+    StgSRT      *srt;  /* pointer to the SRT table */
     StgFunPtr vector[FLEXIBLE_ARRAY];
 #endif
 } StgRetInfoTable;
@@ -331,17 +336,19 @@ typedef struct {
    Thunk info tables
    -------------------------------------------------------------------------- */
 
-// When info tables are laid out backwards, we can omit the SRT
-// pointer iff srt_bitmap is zero.
+/*
+ * When info tables are laid out backwards, we can omit the SRT
+ * pointer iff srt_bitmap is zero.
+ */
 
 typedef struct _StgThunkInfoTable {
 #if !defined(TABLES_NEXT_TO_CODE)
     StgInfoTable i;
 #endif
 #if defined(TABLES_NEXT_TO_CODE)
-    StgWord        srt_offset; // offset to the SRT table
+    StgWord        srt_offset; /* offset to the SRT table */
 #else
-    StgSRT         *srt;       // pointer to the SRT table
+    StgSRT         *srt;       /* pointer to the SRT table */
 #endif
 #if defined(TABLES_NEXT_TO_CODE)
     StgInfoTable i;
@@ -353,16 +360,20 @@ typedef struct _StgThunkInfoTable {
    Accessor macros for fields that might be offsets (C version)
    -------------------------------------------------------------------------- */
 
-// GET_SRT(info)
-// info must be a Stg[Ret|Thunk]InfoTable* (an info table that has a SRT)
+/*
+ * GET_SRT(info)
+ * info must be a Stg[Ret|Thunk]InfoTable* (an info table that has a SRT)
+ */
 #ifdef TABLES_NEXT_TO_CODE
 #define GET_SRT(info) ((StgSRT*) (((StgWord) ((info)+1)) + (info)->srt_offset))
 #else
 #define GET_SRT(info) ((info)->srt)
 #endif
 
-// GET_FUN_SRT(info)
-// info must be a StgFunInfoTable*
+/*
+ * GET_FUN_SRT(info)
+ * info must be a StgFunInfoTable*
+ */
 #ifdef TABLES_NEXT_TO_CODE
 #define GET_FUN_SRT(info) ((StgSRT*) (((StgWord) ((info)+1)) + (info)->f.srt_offset))
 #else
index c2fd399..bb1a4c2 100644 (file)
@@ -1,5 +1,4 @@
 /* -----------------------------------------------------------------------------
- * $Id: Linker.h,v 1.4 2002/05/01 15:46:14 simonmar Exp $
  *
  * (c) The GHC Team, 2000
  *
index 61cb768..e929579 100644 (file)
@@ -1,5 +1,4 @@
 /* -----------------------------------------------------------------------------
- * $Id: MachRegs.h,v 1.22 2005/02/09 15:59:35 wolfgang Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
index dc07097..8d9e044 100644 (file)
@@ -1,6 +1,4 @@
 # -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.29 2005/03/22 11:53:48 simonmar Exp $
-#
 
 TOP = ..
 include $(TOP)/mk/boilerplate.mk
index 9257550..e18fbe9 100644 (file)
@@ -1,7 +1,4 @@
 /*
-  Time-stamp: <Tue Mar 06 2001 00:09:10 Stardate: [-30]6285.03 hwloidl>
-  $Id: Parallel.h,v 1.4 2001/03/22 03:51:09 hwloidl Exp $
   Definitions for GUM i.e. running on a parallel machine.
 
   This section contains definitions applicable only to programs compiled
 
 #if defined(PAR) || defined(GRAN)        /* whole file */
 
-//@node Parallel definitions, End of File
-//@section Parallel definitions
-
-//@menu
-//* Basic definitions::                
-//* GUM::                      
-//* GranSim::                  
-//@end menu
-
-//@node Basic definitions, GUM, Parallel definitions, Parallel definitions
-//@subsection Basic definitions
+/*
+ * @node Parallel definitions, End of File
+ * @section Parallel definitions
+ *
+ * @menu
+ * * Basic definitions::               
+ * * GUM::                     
+ * * GranSim::                 
+ * @end menu
+ *
+ * @node Basic definitions, GUM, Parallel definitions, Parallel definitions
+ * @subsection Basic definitions
+ */
 
 /* This clashes with TICKY, but currently TICKY and PAR hate each other anyway */
 #define _HS  sizeofW(StgHeader)
 # define ADVISORY_POOL         1   /* idx of pool of advisory sparks (parallelism) */
 #endif
 
-//@menu
-//* GUM::                      
-//* GranSim::                  
-//@end menu
-//*/
-
-//@node GUM, GranSim, Basic definitions, Parallel definitions
-//@subsection GUM
+/*
+ * @menu
+ * * GUM::                     
+ * * GranSim::                 
+ * @end menu
+ *
+ * @node GUM, GranSim, Basic definitions, Parallel definitions
+ * @subsection GUM
+ */
 
 #if defined(PAR) 
 /*
   packet in the parallel (GUM) system.
 */
 
-//@menu
-//* Types::                    
-//* Externs::                  
-//* Prototypes::               
-//* Macros::                   
-//@end menu
-//*/
-
-//@node Types, Externs, GUM, GUM
-//@subsubsection Types
+/*
+ * @menu
+ * * Types::                   
+ * * Externs::                 
+ * * Prototypes::              
+ * * Macros::                  
+ * @end menu
+ *
+ * @node Types, Externs, GUM, GUM
+ * @subsubsection Types
+ */
 
 /* Sparks and spark queues */
 typedef StgClosure  *rtsSpark;
@@ -105,17 +106,19 @@ typedef struct rtsPackBuffer_ {
 
 #define PACK_BUFFER_HDR_SIZE 4
 
-//@node Externs, Prototypes, Types, GUM
-//@subsubsection Externs
+/*
+ * @node Externs, Prototypes, Types, GUM
+ * @subsubsection Externs
+ */
 
-// extern rtsBool do_sp_profile;
+/* extern rtsBool do_sp_profile; */
 
 extern globalAddr theGlobalFromGA, theGlobalToGA;
 extern StgBlockedFetch *PendingFetches;
 extern GlobalTaskId    *allPEs;
 
 extern rtsBool      IAmMainThread, GlobalStopPending;
-//extern rtsBool      fishing;
+/*extern rtsBool      fishing; */
 extern rtsTime      last_fish_arrived_at;
 extern nat          outstandingFishes;
 extern GlobalTaskId SysManTask;
@@ -155,8 +158,10 @@ extern GALA *liveIndirections;
 extern GALA *liveRemoteGAs;
 */
 
-//@node Prototypes, Macros, Externs, GUM
-//@subsubsection Prototypes
+/*
+ * @node Prototypes, Macros, Externs, GUM
+ * @subsubsection Prototypes
+ */
 
 /* From ParInit.c */
 void          initParallelSystem(void);
@@ -167,7 +172,7 @@ PEs           taskIDtoPE (GlobalTaskId gtid);
 void          registerTask (GlobalTaskId gtid);
 globalAddr   *LAGAlookup (StgClosure *addr);
 StgClosure   *GALAlookup (globalAddr *ga);
-//static GALA  *allocIndirection (StgPtr addr);
+/*static GALA  *allocIndirection (StgPtr addr); */
 globalAddr   *makeGlobal (StgClosure *addr, rtsBool preferred);
 globalAddr   *setRemoteGA (StgClosure *addr, globalAddr *ga, rtsBool preferred);
 void          splitWeight (globalAddr *to, globalAddr *from);
@@ -183,15 +188,17 @@ StgWord       PackGA (StgWord pe, int slot);
 StgInt highest_slot (void); 
 # endif
 
-//@node Macros,  , Prototypes, GUM
-//@subsubsection Macros
+/*
+ * @node Macros,  , Prototypes, GUM
+ * @subsubsection Macros
+ */
 
 /* delay (in us) between dying fish returning and sending out a new fish */
 #define FISH_DELAY                   1000
 /* max no. of outstanding spark steals */
 #define MAX_FISHES                   1  
 
-// ToDo: check which of these is actually needed!
+/* ToDo: check which of these is actually needed! */
 
 #    define PACK_HEAP_REQUIRED  ((RtsFlags.ParFlags.packBufferSize - PACK_HDR_SIZE) / (PACK_GA_SIZE + _HS) * (MIN_UPD_SIZE + 2))
 
@@ -267,21 +274,24 @@ rtsBool looks_like_ga(globalAddr *ga);
 
 #endif /* PAR */
 
-//@node GranSim,  , GUM, Parallel definitions
-//@subsection GranSim
+/*
+ * @node GranSim,  , GUM, Parallel definitions
+ * @subsection GranSim
+ */
 
 #if defined(GRAN)
 /* ToDo: Check which of the PAR routines are needed in GranSim -- HWL */
 
-//@menu
-//* Types::                    
-//* Prototypes::               
-//* Macros::                   
-//@end menu
-//*/
-
-//@node Types, Prototypes, GranSim, GranSim
-//@subsubsection Types
+/*
+ * @menu
+ * * Types::                   
+ * * Prototypes::              
+ * * Macros::                  
+ * @end menu
+ *
+ * @node Types, Prototypes, GranSim, GranSim
+ * @subsubsection Types
+ */
 
 typedef StgWord *StgBuffer;
 typedef struct rtsPackBuffer_ {
@@ -292,8 +302,10 @@ typedef struct rtsPackBuffer_ {
   StgWord      *buffer;  
 } rtsPackBuffer;
 
-//@node Macros,  , Prototypes, GranSim
-//@subsubsection Macros
+/*
+ * @node Macros,  , Prototypes, GranSim
+ * @subsubsection Macros
+ */
 
 /* max no. of outstanding spark steals */
 #define MAX_FISHES                   1  
@@ -336,8 +348,10 @@ typedef struct rtsPackBuffer_ {
 
 #endif   /* GRAN */
 
-//@node End of File,  , Parallel definitions
-//@section End of File
+/*
+ * @node End of File,  , Parallel definitions
+ * @section End of File
+ */
 
 #endif /* defined(PAR) || defined(GRAN)         whole file */
 
index ce6c4e2..aae99bf 100644 (file)
@@ -56,32 +56,32 @@ Here is a rough hierarchy of the header files by dependency.
 
 Rts.h
   Stg.h
-    ghcconfig.h                // configuration info derived by the configure script.
-    RtsConfig.h                // settings for Rts things (eg. eager vs. lazy BH)
-    MachDeps.h         // sizes of various basic types
-    StgTypes.h         // basic types specific to the virtual machine
-    TailCalls.h                // tail calls in .hc code
-    StgDLL.h           // stuff related to Windows DLLs
-    MachRegs.h         // global register assignments for this arch
-    Regs.h             // "registers" in the virtual machine
-    StgProf.h          // profiling gubbins
-    StgMiscClosures.h  // decls for closures & info tables in the RTS
-    RtsExternal.h      // decls for RTS things required by .hc code
+    ghcconfig.h                /* configuration info derived by the configure script. */
+    RtsConfig.h                /* settings for Rts things (eg. eager vs. lazy BH) */
+    MachDeps.h         /* sizes of various basic types */
+    StgTypes.h         /* basic types specific to the virtual machine */
+    TailCalls.h                /* tail calls in .hc code */
+    StgDLL.h           /* stuff related to Windows DLLs */
+    MachRegs.h         /* global register assignments for this arch */
+    Regs.h             /* "registers" in the virtual machine */
+    StgProf.h          /* profiling gubbins */
+    StgMiscClosures.h  /* decls for closures & info tables in the RTS */
+    RtsExternal.h      /* decls for RTS things required by .hc code */
       (RtsAPI.h)
       (HsFFI.h)
 
-  RtsTypes.h           // types used in the RTS
+  RtsTypes.h           /* types used in the RTS */
 
-  Constants.h          // build-time constants
+  Constants.h          /* build-time constants */
   StgLdvProf.h
   StgFun.h
   Closures.h
-  Liveness.h           // macros for constructing RET_DYN liveness masks
+  Liveness.h           /* macros for constructing RET_DYN liveness masks */
   ClosureMacros.h
   ClosureTypes.h
   InfoTables.h
   TSO.h
-  Updates.h            // macros for performing updates
+  Updates.h            /* macros for performing updates */
   GranSim.h
   Parallel.h
   SMP.h
@@ -93,9 +93,9 @@ Rts.h
   DNInvoke.h
     Dotnet.h
 
-Cmm.h                  // included into .cmm source only
-  DerivedConstants.h   // generated by mkDerivedConstants.c from other
-                       // .h files.
+Cmm.h                  /* included into .cmm source only */
+  DerivedConstants.h   /* generated by mkDerivedConstants.c from other */
+                       /* .h files. */
   (Constants.h)
   (ClosureTypes.h)
   (StgFun.h)
@@ -103,12 +103,12 @@ Cmm.h                     // included into .cmm source only
   (Liveness.h)  
   (Block.h)
 
-Bytecodes.h    // Bytecode definitions for the interpreter
-Linker.h       // External API to the linker
-RtsFlags.h     // External API to the RTS runtime flags
-SchedAPI.h     // External API to the RTS scheduler
-ieee-flpt.h    // ToDo: needed?
+Bytecodes.h    /* Bytecode definitions for the interpreter */
+Linker.h       /* External API to the linker */
+RtsFlags.h     /* External API to the RTS runtime flags */
+SchedAPI.h     /* External API to the RTS scheduler */
+ieee-flpt.h    /* ToDo: needed? */
 
-RtsAPI.h       // The top-level interface to the RTS (rts_evalIO(), etc.)
-HsFFI.h                // The external FFI api
+RtsAPI.h       /* The top-level interface to the RTS (rts_evalIO(), etc.) */
+HsFFI.h                /* The external FFI api */
   
index 614499e..10e0b3f 100644 (file)
@@ -72,8 +72,8 @@ typedef struct StgRegTable_ {
   StgUnion       rR6;
   StgUnion       rR7;
   StgUnion       rR8;
-  StgUnion       rR9;          // used occasionally by heap/stack checks
-  StgUnion       rR10;         // used occasionally by heap/stack checks
+  StgUnion       rR9;          /* used occasionally by heap/stack checks */
+  StgUnion       rR10;         /* used occasionally by heap/stack checks */
   StgFloat       rF1;
   StgFloat       rF2;
   StgFloat       rF3;
@@ -88,9 +88,9 @@ typedef struct StgRegTable_ {
   struct StgTSO_ *rCurrentTSO;
   struct bdescr_ *rNursery;
   struct bdescr_ *rCurrentNursery;
-  StgWord         rHpAlloc;    // number of *bytes* being allocated in heap 
+  StgWord         rHpAlloc;    /* number of *bytes* being allocated in heap */
 #if defined(SMP) || defined(PAR)
-  StgSparkPool   rSparks;      // per-task spark pool
+  StgSparkPool   rSparks;      /* per-task spark pool */
 #endif
 } StgRegTable;
 
index 107862b..c8b1f1c 100644 (file)
@@ -1,5 +1,4 @@
 /* -----------------------------------------------------------------------------
- * $Id: RtsExternal.h,v 1.8 2005/01/31 12:55:50 simonmar Exp $
  *
  * (c) The GHC Team, 1998-2004
  *
index 43515e8..d0ab562 100644 (file)
@@ -1,5 +1,4 @@
 /* -----------------------------------------------------------------------------
- * $Id: RtsFlags.h,v 1.48 2005/02/03 10:59:05 simonmar Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -45,22 +44,22 @@ struct GC_FLAGS {
 };
 
 struct DEBUG_FLAGS {  
-    // flags to control debugging output & extra checking in various subsystems
-    rtsBool scheduler;      // 's'
-    rtsBool interpreter;    // 'i'
-    rtsBool codegen;        // 'c'
-    rtsBool weak;           // 'w'
-    rtsBool gccafs;         // 'G'
-    rtsBool gc;             // 'g'
-    rtsBool block_alloc;    // 'b'
-    rtsBool sanity;         // 'S'   warning: might be expensive!
-    rtsBool stable;         // 't'
-    rtsBool prof;           // 'p'
-    rtsBool gran;           // 'r'
-    rtsBool par;            // 'P'
-    rtsBool linker;         // 'l'   the object linker
-    rtsBool apply;          // 'a'
-    rtsBool stm;            // 'm'
+    /* flags to control debugging output & extra checking in various subsystems */
+    rtsBool scheduler;      /* 's' */
+    rtsBool interpreter;    /* 'i' */
+    rtsBool codegen;        /* 'c' */
+    rtsBool weak;           /* 'w' */
+    rtsBool gccafs;         /* 'G' */
+    rtsBool gc;             /* 'g' */
+    rtsBool block_alloc;    /* 'b' */
+    rtsBool sanity;         /* 'S'   warning: might be expensive! */
+    rtsBool stable;         /* 't' */
+    rtsBool prof;           /* 'p' */
+    rtsBool gran;           /* 'r' */
+    rtsBool par;            /* 'P' */
+    rtsBool linker;         /* 'l'   the object linker */
+    rtsBool apply;          /* 'a' */
+    rtsBool stm;            /* 'm' */
 };
 
 struct COST_CENTRE_FLAGS {
@@ -238,8 +237,8 @@ struct GRAN_FLAGS {
   struct GRAN_COST_FLAGS Costs;          /* cost metric for simulation */
   struct GRAN_DEBUG_FLAGS Debug;         /* debugging options */
 
-  nat  maxThreads;              // ToDo: share with SMP and GUM
-  // rtsBool labelling;
+  nat  maxThreads;              /* ToDo: share with SMP and GUM */
+  /* rtsBool labelling; */
   nat  packBufferSize;
   nat  packBufferSize_internal;
 
@@ -275,9 +274,9 @@ struct GRAN_FLAGS {
   rtsBool RandomSteal;        /* steal spark/thread from random proc */
   rtsBool NoForward;        /* no forwarding of fetch messages */
 
-  // unsigned int          debug;
-  //  rtsBool event_trace;
-  //  rtsBool event_trace_all;
+  /* unsigned int          debug; */
+  /*  rtsBool event_trace; */
+  /*  rtsBool event_trace_all; */
 };
 #endif /* GRAN */
 
@@ -290,7 +289,7 @@ struct TICKY_FLAGS {
 /* Put them together: */
 
 typedef struct _RTS_FLAGS {
-       // The first portion of RTS_FLAGS is invariant.
+    /* The first portion of RTS_FLAGS is invariant. */
     struct GC_FLAGS         GcFlags;
     struct CONCURRENT_FLAGS  ConcFlags;
     struct DEBUG_FLAGS      DebugFlags;
@@ -309,7 +308,7 @@ typedef struct _RTS_FLAGS {
 #ifdef COMPILING_RTS_MAIN
 extern DLLIMPORT RTS_FLAGS RtsFlags;
 #elif IN_STG_CODE
-// Hack because the C code generator can't generate '&label'.
+/* Hack because the C code generator can't generate '&label'. */
 extern RTS_FLAGS RtsFlags[];
 #else
 extern RTS_FLAGS RtsFlags;
index 7e75349..3f0da3d 100644 (file)
@@ -73,4 +73,4 @@ extern RtsMsgFunction rtsFatalInternalErrorFn;
 extern RtsMsgFunction rtsDebugMsgFn;
 extern RtsMsgFunction rtsErrorMsgFn;
 
-#endif // RTSMESSAGES_H
+#endif /* RTSMESSAGES_H */
index 4a30ef9..1a29ea8 100644 (file)
@@ -48,9 +48,9 @@ typedef ullong        rtsTime;
 typedef struct hashtable ParHashTable;
 typedef struct hashlist ParHashList;
 
-// typedef double REAL_TIME;
-// typedef W_ TIME;
-// typedef GlobalTaskId Proc;
+/* typedef double REAL_TIME; */
+/* typedef W_ TIME; */
+/* typedef GlobalTaskId Proc; */
 typedef int           GlobalTaskId;
 typedef GlobalTaskId  PEs;
 typedef unsigned int  rtsWeight;
@@ -79,8 +79,10 @@ typedef struct gala {
 
 #elif defined(GRAN)
 
-// GlobalTaskId is dummy in GranSim; 
-// we define it to have cleaner code in the RTS
+/*
+ * GlobalTaskId is dummy in GranSim;
+ * we define it to have cleaner code in the RTS
+ */
 typedef int       GlobalTaskId;
 typedef lnat      rtsTime;
 typedef StgWord   PEs;
index a1f14e4..e35b95b 100644 (file)
@@ -1,5 +1,4 @@
 /* ----------------------------------------------------------------------------
- * $Id: SMP.h,v 1.5 2005/01/28 12:55:52 simonmar Exp $
  *
  * (c) The GHC Team, 1999
  *
index bafc523..45723d7 100644 (file)
@@ -84,29 +84,35 @@ extern void stmPreGCHook(void);
 
 */
 
-// Create and enter a new transaction context
+/* Create and enter a new transaction context */
 
 extern StgTRecHeader *stmStartTransaction(StgTRecHeader *outer);
 
-// Exit the current transaction context, abandoning any read/write
-// operations performed within it and removing the thread from any
-// tvar wait queues if it was waitin.  Note that if nested transactions
-// are not fully supported then this may leave the enclosing
-// transaction contexts doomed to abort.
+/*
+ * Exit the current transaction context, abandoning any read/write
+ * operations performed within it and removing the thread from any
+ * tvar wait queues if it was waitin.  Note that if nested transactions
+ * are not fully supported then this may leave the enclosing
+ * transaction contexts doomed to abort.
+ */
 
 extern void stmAbortTransaction(StgTRecHeader *trec);
 
-// Ensure that a subsequent commit / validation will fail.  We use this 
-// in our current handling of transactions that may have become invalid
-// and started looping.  We strip their stack back to the ATOMICALLY_FRAME,
-// and, when the thread is next scheduled, discover it to be invalid and
-// re-execute it.  However, we need to force the transaction to stay invalid
-// in case other threads' updates make it valid in the mean time.
+/*
+ * Ensure that a subsequent commit / validation will fail.  We use this 
+ * in our current handling of transactions that may have become invalid
+ * and started looping.  We strip their stack back to the ATOMICALLY_FRAME,
+ * and, when the thread is next scheduled, discover it to be invalid and
+ * re-execute it.  However, we need to force the transaction to stay invalid
+ * in case other threads' updates make it valid in the mean time.
+ */
 
 extern void stmCondemnTransaction(StgTRecHeader *trec);
 
-// Return the trec within which the specified trec was created (not
-// valid if trec==NO_TREC).
+/*
+ * Return the trec within which the specified trec was created (not
+ * valid if trec==NO_TREC).
+ */
 
 extern StgTRecHeader *stmGetEnclosingTRec(StgTRecHeader *trec);
 
@@ -145,40 +151,50 @@ extern StgTRecHeader *stmGetEnclosingTRec(StgTRecHeader *trec);
    is actually still valid.
 */
 
-// Test whether the current transaction context is valid, i.e. whether
-// it is still possible for it to commit successfully.  Note: we assume that
-// once stmValidateTransaction has returned FALSE for a given transaction then
-// that transaction will never again be valid -- we rely on this in Schedule.c when
-// kicking invalid threads at GC (in case they are stuck looping)
+/*
+ * Test whether the current transaction context is valid, i.e. whether
+ * it is still possible for it to commit successfully.  Note: we assume that
+ * once stmValidateTransaction has returned FALSE for a given transaction then
+ * that transaction will never again be valid -- we rely on this in Schedule.c when
+ * kicking invalid threads at GC (in case they are stuck looping)
+ */
 
 extern StgBool stmValidateTransaction(StgTRecHeader *trec);
 
-// Test whether the current transaction context is valid and, if so,
-// commit its memory accesses to the heap.  stmCommitTransaction must
-// unblock any threads which are waiting on tvars that updates have
-// been committed to.
+/*
+ * Test whether the current transaction context is valid and, if so,
+ * commit its memory accesses to the heap.  stmCommitTransaction must
+ * unblock any threads which are waiting on tvars that updates have
+ * been committed to.
+ */
 
 extern StgBool stmCommitTransaction(StgTRecHeader *trec);
 
-// Test whether the current transaction context is valid and, if so,
-// start the thread waiting for updates to any of the tvars it has
-// ready from and mark it as blocked.  It is an error to call stmWait
-// if the thread is already waiting.
+/*
+ * Test whether the current transaction context is valid and, if so,
+ * start the thread waiting for updates to any of the tvars it has
+ * ready from and mark it as blocked.  It is an error to call stmWait
+ * if the thread is already waiting.
+ */
 
 extern StgBool stmWait(StgTSO *tso, StgTRecHeader *trec);
 
-// Test whether the current transaction context is valid and, if so,
-// leave the thread waiting and mark it as blocked again.  If the
-// transaction context is no longer valid then stop the thread waiting
-// and leave it as unblocked.  It is an error to call stmReWait if the
-// thread is not waiting.
+/*
+ * Test whether the current transaction context is valid and, if so,
+ * leave the thread waiting and mark it as blocked again.  If the
+ * transaction context is no longer valid then stop the thread waiting
+ * and leave it as unblocked.  It is an error to call stmReWait if the
+ * thread is not waiting.
+ */
 
 extern StgBool stmReWait(StgTSO *tso);
 
-// Merge the accesses made so far in the second trec into the first trec.
-// Note that the resulting trec is only intended to be used in wait operations.
-// This avoids defining what happens if "trec" and "other" contain conflicting
-// updates.
+/*
+ * Merge the accesses made so far in the second trec into the first trec.
+ * Note that the resulting trec is only intended to be used in wait operations.
+ * This avoids defining what happens if "trec" and "other" contain conflicting
+ * updates.
+ */
 
 extern StgBool stmMergeForWaiting(StgTRecHeader *trec, StgTRecHeader *other);
 
@@ -189,14 +205,17 @@ extern StgBool stmMergeForWaiting(StgTRecHeader *trec, StgTRecHeader *other);
    ----------------------
 */
 
-// Return the logical contents of 'tvar' within the context of the
-// thread's current transaction.
+/*
+ * Return the logical contents of 'tvar' within the context of the
+ * thread's current transaction.
+ */
 
 extern StgClosure *stmReadTVar(StgTRecHeader *trec, 
                               StgTVar *tvar);
 
-// Update the logical contents of 'tvar' within the context of the
-// thread's current transaction.
+/* Update the logical contents of 'tvar' within the context of the
+ * thread's current transaction.
+ */
 
 extern void stmWriteTVar(StgTRecHeader *trec,
                         StgTVar *tvar, 
@@ -204,7 +223,7 @@ extern void stmWriteTVar(StgTRecHeader *trec,
 
 /*----------------------------------------------------------------------*/
 
-// NULLs
+/* NULLs */
 
 #define END_STM_WAIT_QUEUE ((StgTVarWaitQueue *)(void *)&stg_END_STM_WAIT_QUEUE_closure)
 #define END_STM_CHUNK_LIST ((StgTRecChunk *)(void *)&stg_END_STM_CHUNK_LIST_closure)
index 07fe613..8fdf17e 100644 (file)
@@ -1,5 +1,4 @@
 /* -----------------------------------------------------------------------------
- * $Id: SchedAPI.h,v 1.19 2003/11/12 17:27:03 sof Exp $
  *
  * (c) The GHC Team 1998-2002
  *
@@ -12,7 +11,7 @@
 #define SCHEDAPI_H
 
 #if defined(GRAN)
-// Dummy def for NO_PRI if not in GranSim
+/* Dummy def for NO_PRI if not in GranSim */
 #define NO_PRI  0
 #endif
 
index cacb1db..a5907bb 100644 (file)
@@ -15,4 +15,4 @@
 #define STG_SIG_HAN   (-4)
 #define STG_SIG_RST   (-5)
 
-#endif // SIGNALS_H
+#endif /* SIGNALS_H */
index 2c6bf40..f11f452 100644 (file)
@@ -1,5 +1,4 @@
 /* -----------------------------------------------------------------------------
- * $Id: Stg.h,v 1.67 2005/02/01 14:14:41 simonmar Exp $
  *
  * (c) The GHC Team, 1998-2004
  *
index a1a4712..639f0e5 100644 (file)
@@ -46,4 +46,4 @@
 #define ARG_PPPPPPP  23
 #define ARG_PPPPPPPP 24
 
-#endif // STGFUN_H
+#endif /* STGFUN_H */
index b94066e..9b3ce69 100644 (file)
 /* -----------------------------------------------------------------------------
  * Data Structures 
  * ---------------------------------------------------------------------------*/  
-// NB. be careful to avoid unwanted padding between fields, by
-// putting the 8-byte fields on an 8-byte boundary.  Padding can
-// vary between C compilers, and we don't take into account any
-// possible padding when generating CCS and CC decls in the code
-// generator (compiler/codeGen/CgProf.hs).
+/*
+ * NB. be careful to avoid unwanted padding between fields, by
+ * putting the 8-byte fields on an 8-byte boundary.  Padding can
+ * vary between C compilers, and we don't take into account any
+ * possible padding when generating CCS and CC decls in the code
+ * generator (compiler/codeGen/CgProf.hs).
+ */
 
 typedef struct _CostCentre {
   StgInt ccID;
@@ -26,7 +28,7 @@ typedef struct _CostCentre {
  
   /* used for accumulating costs at the end of the run... */
   StgWord   time_ticks;
-  StgWord64 mem_alloc;      // align 8 (see above)
+  StgWord64 mem_alloc;      /* align 8 (see above) */
 
   StgInt    is_caf;
 
@@ -40,11 +42,11 @@ typedef struct _CostCentreStack {
   struct _CostCentreStack *prevStack;
   struct _IndexTable *indexTable;
 
-  StgWord64  scc_count;       // align 8 (see above)
+  StgWord64  scc_count;       /* align 8 (see above) */
   StgWord    selected;
   StgWord    time_ticks;
-  StgWord64  mem_alloc;       // align 8 (see above)
-  StgWord64  inherited_alloc; // align 8 (see above)
+  StgWord64  mem_alloc;       /* align 8 (see above) */
+  StgWord64  inherited_alloc; /* align 8 (see above) */
   StgWord    inherited_ticks;
 
   CostCentre *root;
@@ -128,7 +130,7 @@ extern CostCentreStack CCS_OVERHEAD[];   /* Profiling overhead */
 extern CostCentre      CC_DONT_CARE[];
 extern CostCentreStack CCS_DONT_CARE[];  /* shouldn't ever get set */
 
-#endif // IN_STG_CODE
+#endif /* IN_STG_CODE */
 
 extern unsigned int RTS_VAR(CC_ID);    /* global ids */
 extern unsigned int RTS_VAR(CCS_ID);
index c39c0ce..27dd24e 100644 (file)
@@ -1,5 +1,4 @@
 /* ----------------------------------------------------------------------------
- * $Id: StgTicky.h,v 1.16 2004/08/13 13:09:38 simonmar Exp $
  *
  * (c) The AQUA project, Glasgow University, 1994-1997
  * (c) The GHC Team, 1998-1999
@@ -94,8 +93,10 @@ typedef struct _StgEntCounter {
        ALLOC_BH_gds += (g);    ALLOC_BH_slp += (s);    \
        TICK_ALLOC_HISTO(BH,_HS,g,s)
 
-// admin size doesn't take into account the FUN, that is accounted for
-// in the "goods".
+/*
+ * admin size doesn't take into account the FUN, that is accounted for
+ * in the "goods".
+ */
 #define TICK_ALLOC_PAP(g,s)                                    \
        ALLOC_PAP_ctr++;      ALLOC_PAP_adm += sizeofW(StgPAP)-1; \
        ALLOC_PAP_gds += (g); ALLOC_PAP_slp += (s);     \
@@ -209,14 +210,18 @@ extern StgEntCounter *ticky_entry_ctrs;
    SLOW_CALL_hst[((__idx > 8) ? 8 : __idx)] -= 1;      \
  }
 
-// A slow call with n arguments.  In the unevald case, this call has
-// already been counted once, so don't count it again.
+/*
+ * A slow call with n arguments.  In the unevald case, this call has
+ * already been counted once, so don't count it again.
+ */
 #define TICK_SLOW_CALL(n) \
   SLOW_CALL_ctr++; \
   TICK_SLOW_HISTO(n)
 
-// This slow call was found to be to an unevaluated function; undo the
-// ticks we did in TICK_SLOW_CALL.
+/*
+ * This slow call was found to be to an unevaluated function; undo the
+ * ticks we did in TICK_SLOW_CALL.
+ */
 #define TICK_SLOW_CALL_UNEVALD(n) \
   SLOW_CALL_UNEVALD_ctr++; \
   SLOW_CALL_ctr--; \
@@ -227,11 +232,13 @@ extern StgEntCounter *ticky_entry_ctrs;
   MULTI_CHUNK_SLOW_CALL_ctr++; \
   MULTI_CHUNK_SLOW_CALL_CHUNKS_ctr += chunks;
 
-// A completely unknown tail-call
+/* A completely unknown tail-call */
 #define TICK_UNKNOWN_CALL()               UNKNOWN_CALL_ctr++
 
-// slow call patterns (includes "extra" args to known calls,
-// so the total of these will be greater than UNKNOWN_CALL_ctr).
+/*
+ * slow call patterns (includes "extra" args to known calls,
+ * so the total of these will be greater than UNKNOWN_CALL_ctr).
+ */
 #define TICK_SLOW_CALL_v()             SLOW_CALL_v_ctr++
 #define TICK_SLOW_CALL_f()             SLOW_CALL_f_ctr++
 #define TICK_SLOW_CALL_d()             SLOW_CALL_d_ctr++
@@ -254,7 +261,7 @@ extern StgEntCounter *ticky_entry_ctrs;
 #define TICK_KNOWN_CALL_TOO_FEW_ARGS()  KNOWN_CALL_TOO_FEW_ARGS_ctr++
 #define TICK_KNOWN_CALL_EXTRA_ARGS()    KNOWN_CALL_EXTRA_ARGS_ctr++
 
-// A slow call to a FUN found insufficient arguments, and built a PAP
+/* A slow call to a FUN found insufficient arguments, and built a PAP */
 #define TICK_SLOW_CALL_FUN_TOO_FEW()       SLOW_CALL_FUN_TOO_FEW_ctr++
 #define TICK_SLOW_CALL_FUN_CORRECT()       SLOW_CALL_FUN_CORRECT_ctr++
 #define TICK_SLOW_CALL_FUN_TOO_MANY()      SLOW_CALL_FUN_TOO_MANY_ctr++
@@ -514,7 +521,7 @@ EXTERN unsigned long ALLOC_BF_hst[5]
    = {0,0,0,0,0}
 #endif
 ;
-#endif // PAR
+#endif /* PAR */
 
 EXTERN unsigned long ENT_VIA_NODE_ctr INIT(0);
 EXTERN unsigned long ENT_STATIC_THK_ctr INIT(0);
index 7108bc6..2706756 100644 (file)
@@ -234,8 +234,8 @@ recordMutable(StgClosure *p)
 
 void revertCAFs( void );
 
-    // set to disable CAF garbage collection in GHCi.
-    // (needed when dynamic libraries are used).
+/* set to disable CAF garbage collection in GHCi. */
+/* (needed when dynamic libraries are used). */
 extern rtsBool keepCAFs;
 
 /* -----------------------------------------------------------------------------
@@ -400,4 +400,4 @@ extern StgClosure * RTS_VAR(caf_list);
 extern StgClosure * RTS_VAR(revertible_caf_list);
 extern StgTSO     * RTS_VAR(resurrected_threads);
 
-#endif // STORAGE_H
+#endif /* STORAGE_H */
index 2eca88a..098ec4c 100644 (file)
@@ -1,5 +1,4 @@
 /* -----------------------------------------------------------------------------
- * $Id: TSO.h,v 1.41 2005/02/10 13:02:05 simonmar Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -97,7 +96,7 @@ typedef struct {
 typedef union {
   StgClosure *closure;
   struct StgTSO_ *tso;
-  StgInt fd;   // StgInt instead of int, so that it's the same size as the ptrs
+  StgInt fd;   /* StgInt instead of int, so that it's the same size as the ptrs */
 #if defined(mingw32_HOST_OS)
   StgAsyncIOResult* async_result;
 #endif
@@ -125,20 +124,20 @@ typedef union {
 typedef struct StgTSO_ {
   StgHeader          header;
 
-  struct StgTSO_*    link;          // Links threads onto blocking queues */
-  struct StgTSO_*    global_link;    // Links all threads together */
+  struct StgTSO_*    link;          /* Links threads onto blocking queues */
+  struct StgTSO_*    global_link;    /* Links all threads together */
   
-  StgWord16           what_next;  // Values defined in Constants.h
-  StgWord16           why_blocked;  // Values defined in Constants.h
+  StgWord16           what_next;  /* Values defined in Constants.h */
+  StgWord16           why_blocked;  /* Values defined in Constants.h */
   StgTSOBlockInfo    block_info;
   struct StgTSO_*    blocked_exceptions;
   StgThreadID        id;
   int                saved_errno;
   struct StgMainThread_* main;
-  struct StgTRecHeader_ *trec;       // STM transaction record 
+  struct StgTRecHeader_ *trec;       /* STM transaction record */
   
 #ifdef TICKY_TICKY
-  // TICKY-specific stuff would go here.
+  /* TICKY-specific stuff would go here. */
 #endif
 #ifdef PROFILING
    StgTSOProfInfo prof;
index aa2d6f9..750b398 100644 (file)
@@ -1,5 +1,4 @@
 /* -----------------------------------------------------------------------------
- * $Id: TailCalls.h,v 1.20 2005/03/08 09:01:20 simonmar Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
index 0845e20..cf8b8cd 100644 (file)
@@ -343,17 +343,21 @@ updateWithPermIndirection(const StgInfoTable *info,
 
   ASSERT( p1 != p2 && !closure_IND(p1) );
 
-  // @LDV profiling
-  // Destroy the old closure.
-  // Nb: LDV_* stuff cannot mix with ticky-ticky
+  /*
+   * @LDV profiling
+   * Destroy the old closure.
+   * Nb: LDV_* stuff cannot mix with ticky-ticky
+   */
   LDV_RECORD_DEAD_FILL_SLOP_DYNAMIC(p1);
 
   bd = Bdescr((P_)p1);
   if (bd->gen_no == 0) {
     ((StgInd *)p1)->indirectee = p2;
     SET_INFO(p1, &stg_IND_PERM_info);
-    // @LDV profiling
-    // We have just created a new closure.
+    /*
+     * @LDV profiling
+     * We have just created a new closure.
+     */
     LDV_RECORD_CREATE(p1);
     TICK_UPD_NEW_PERM_IND(p1);
   } else {
@@ -362,8 +366,10 @@ updateWithPermIndirection(const StgInfoTable *info,
     }
     ((StgInd *)p1)->indirectee = p2;
     SET_INFO(p1, &stg_IND_OLDGEN_PERM_info);
-    // @LDV profiling
-    // We have just created a new closure.
+    /*
+     * @LDV profiling
+     * We have just created a new closure.
+     */
     LDV_RECORD_CREATE(p1);
     TICK_UPD_OLD_PERM_IND();
   }
index 21d96a8..085041d 100644 (file)
 
 #define IN_STG_CODE 0
 
-// We need offsets of profiled things... better be careful that this
-// doesn't affect the offsets of anything else.
+/*
+ * We need offsets of profiled things... better be careful that this
+ * doesn't affect the offsets of anything else.
+ */
 #define PROFILING
 
 #include "Rts.h"
 #define field_offset(s_type, field) \
     field_offset_(str(s_type,field),s_type,field);
 
-// An access macro for use in C-- sources.  
+/* An access macro for use in C-- sources. */
 #define struct_field_macro(str) \
     printf("#define " str "(__ptr__)  REP_" str "[__ptr__+OFFSET_" str "]\n");
 
-// Outputs the byte offset and MachRep for a field
+/* Outputs the byte offset and MachRep for a field */
 #define struct_field(s_type, field)            \
     field_offset(s_type, field);               \
     field_type(s_type, field);                 \
 #define struct_size(s_type) \
     def_size(#s_type, sizeof(s_type));
 
-// Size of a closure type, minus the header, named SIZEOF_<type>_NoHdr
-// Also, we #define SIZEOF_<type> to be the size of the whole closure for .cmm.
+/*
+ * Size of a closure type, minus the header, named SIZEOF_<type>_NoHdr
+ * Also, we #define SIZEOF_<type> to be the size of the whole closure for .cmm.
+ */
 #define closure_size(s_type) \
     def_size(#s_type "_NoHdr", sizeof(s_type) - sizeof(StgHeader)); \
     def_closure_size(#s_type, sizeof(s_type) - sizeof(StgHeader));
 
-// An access macro for use in C-- sources.  
+/* An access macro for use in C-- sources. */
 #define closure_field_macro(str) \
     printf("#define " str "(__ptr__)  REP_" str "[__ptr__+SIZEOF_StgHeader+OFFSET_" str "]\n");
 
     closure_field_offset_(str(s_type,field),s_type,field); \
     closure_payload_macro(str(s_type,field));
 
-// Byte offset and MachRep for a closure field, minus the header
+/* Byte offset and MachRep for a closure field, minus the header */
 #define closure_field(s_type, field) \
     closure_field_offset(s_type,field) \
     field_type(s_type, field); \
     closure_field_macro(str(s_type,field))
 
-// Byte offset and MachRep for a closure field, minus the header
+/* Byte offset and MachRep for a closure field, minus the header */
 #define closure_field_(str, s_type, field) \
     closure_field_offset_(str,s_type,field) \
     field_type_(str, s_type, field); \
     closure_field_macro(str)
 
-// Byte offset and MachRep for a TSO field, minus the header and
-// variable prof bit.
+/*
+ * Byte offset and MachRep for a TSO field, minus the header and
+ * variable prof bit.
+ */
 #define tso_offset(s_type, field) \
     def_offset(str(s_type,field), OFFSET(s_type,field) - sizeof(StgHeader) - sizeof(StgTSOProfInfo));
 
@@ -157,7 +163,7 @@ main(int argc, char *argv[])
     printf("/* This file is created automatically.  Do not edit by hand.*/\n\n");
 
     printf("#define STD_HDR_SIZE   %d\n", sizeofW(StgHeader) - sizeofW(StgProfHeader));
-    // grrr.. PROFILING is on so we need to subtract sizeofW(StgProfHeader)
+    /* grrr.. PROFILING is on so we need to subtract sizeofW(StgProfHeader) */
     printf("#define PROF_HDR_SIZE  %d\n", sizeofW(StgProfHeader));
     printf("#define GRAN_HDR_SIZE  %d\n", sizeofW(StgGranHeader));
 
index 14031c2..76e36cb 100644 (file)
@@ -26,4 +26,4 @@ extern StgFun *stg_stack_save_entries[];
 // canned bitmap for each arg type
 extern StgWord stg_arg_bitmaps[];
 
-#endif // APPLY_H
+#endif /* APPLY_H */
index afb02ac..7a2989e 100644 (file)
@@ -22,4 +22,4 @@ extern void    arenaFree  ( Arena * );
 // For internal use only:
 extern unsigned long arenaBlocks( void );
 
-#endif // ARENA_H
+#endif /* ARENA_H */
index d0090b2..bbec122 100644 (file)
@@ -76,5 +76,5 @@
      Sp_adj(n+1);                                              \
      jump %ENTRY_CODE(Sp(0));
 
-#endif // APPLY_H
+#endif /* APPLY_H */
 
index e615035..b82ec09 100644 (file)
@@ -111,6 +111,6 @@ static inline rtsBool allFreeCapabilities (void)
 //
 extern void grabCapability( Capability **pCap );
 
-#endif // !RTS_SUPPORTS_THREADS
+#endif /* !RTS_SUPPORTS_THREADS */
 
 #endif /* __CAPABILITY_H__ */
index 1f67fd4..aacef6b 100644 (file)
@@ -3088,7 +3088,7 @@ linear_scan:
                           p, info_type((StgClosure *)p)));
            break;
        }
-#endif // PAR
+#endif /* PAR */
 
        case TVAR_WAIT_QUEUE:
          {
@@ -4255,4 +4255,4 @@ maybeLarge(StgClosure *closure)
 }
 
   
-#endif // DEBUG
+#endif /* DEBUG */
index c41b9b5..409e744 100644 (file)
@@ -629,7 +629,7 @@ __stg_gc_fun
        jump W_[stg_stack_save_entries + WDS(type)];
            // jumps to stg_gc_noregs after saving stuff
     }
-#endif // !NO_ARG_REGS
+#endif /* !NO_ARG_REGS */
 }
 
 /* -----------------------------------------------------------------------------
index 3bb560f..063c9f5 100644 (file)
@@ -11,4 +11,4 @@
 
 extern StgThreadReturnCode interpretBCO (Capability* cap);
 
-#endif // INTERPRETER_H
+#endif /* INTERPRETER_H */
index 5693bd2..11c1783 100644 (file)
@@ -756,7 +756,7 @@ initLinker( void )
 #   if defined(openbsd_HOST_OS)
     dl_libc_handle = dlopen("libc.so", RTLD_LAZY);
 #   endif
-#   endif // RTLD_DEFAULT
+#   endif /* RTLD_DEFAULT */
 #   endif
 }
 
index 07c40a0..ba8eb2b 100644 (file)
@@ -86,4 +86,4 @@ StgBool slowIsHeapAlloced(void *p);
 # error HEAP_ALLOCED not defined
 #endif
 
-#endif // __MBLOCK_H__
+#endif /* __MBLOCK_H__ */
index 9fbfbfe..1125fd0 100644 (file)
@@ -228,7 +228,7 @@ doingRetainerProfiling( void )
     return (RtsFlags.ProfFlags.doHeapProfile == HEAP_BY_RETAINER
            || RtsFlags.ProfFlags.retainerSelector != NULL);
 }
-#endif // PROFILING
+#endif /* PROFILING */
 
 // Precesses a closure 'c' being destroyed whose size is 'size'.
 // Make sure that LDV_recordDead() is not invoked on 'inherently used' closures
@@ -341,7 +341,7 @@ nextEra( void )
                                       "nextEra");
        }
     }
-#endif // PROFILING
+#endif /* PROFILING */
 
     initEra( &censuses[era] );
 }
@@ -560,7 +560,7 @@ fprint_ccs(FILE *fp, CostCentreStack *ccs, nat max_length)
     }
     fprintf(fp, "%s", buf);
 }
-#endif // PROFILING
+#endif /* PROFILING */
 
 rtsBool
 strMatchesSelector( char* str, char* sel )
index bec04fe..b9900f5 100644 (file)
@@ -929,6 +929,6 @@ debugCCS( CostCentreStack *ccs )
   }
   debugBelch(">");
 }
-#endif // DEBUG
+#endif /* DEBUG */
 
 #endif /* PROFILING */
index 927a734..2461948 100644 (file)
@@ -2335,6 +2335,6 @@ belongToHeap(StgPtr p)
        }
     }
 }
-#endif // DEBUG_RETAINER
+#endif /* DEBUG_RETAINER */
 
 #endif /* PROFILING */
index 6f51cb0..bfa0bc8 100644 (file)
@@ -88,7 +88,7 @@ refreshAllRetainerSet(void)
     for (i = 0; i < HASH_TABLE_SIZE; i++)
        hashTable[i] = NULL;
     nextId = 2;
-#endif // FIRST_APPROACH
+#endif /* FIRST_APPROACH */
 }
 
 /* -----------------------------------------------------------------------------
@@ -493,6 +493,6 @@ outputAllRetainerSet(FILE *prof_file)
 
     stgFree(rsArray);
 }
-#endif // SECOND_APPROACH
+#endif /* SECOND_APPROACH */
 
 #endif /* PROFILING */
index 1ab0976..965b9d3 100644 (file)
@@ -197,5 +197,5 @@ void outputAllRetainerSet(FILE *);
 //       the best place to define it.
 void printRetainer(FILE *, retainer);
 
-#endif // PROFILING
-#endif // RETAINERSET_H
+#endif /* PROFILING */
+#endif /* RETAINERSET_H */
index e880c1d..3219771 100644 (file)
@@ -428,7 +428,7 @@ usage_text[] = {
 "  -Dl  DEBUG: linker",
 "  -Dm  DEBUG: stm",
 "",
-#endif // DEBUG
+#endif /* DEBUG */
 #if defined(SMP)
 "  -N<n>     Use <n> OS threads (default: 1)",
 #endif
@@ -973,7 +973,7 @@ error = rtsTrue;
                    error = rtsTrue;
                }
                ) 
-#endif // PROFILING
+#endif /* PROFILING */
                break;
 
 #if defined(PROFILING) 
index e2222ae..3e8ac5d 100644 (file)
@@ -48,4 +48,4 @@ extern void heapCheckFail( void );
 extern void* __hscore_get_saved_termios(int fd);
 extern void __hscore_set_saved_termios(int fd, void* ts);
 
-#endif // RTSUTILS_H
+#endif /* RTSUTILS_H */
index 6d80898..a8f1f56 100644 (file)
@@ -418,7 +418,7 @@ checkClosure( StgClosure* p )
 #ifdef DIST
     case REMOTE_REF:
       return sizeofW(StgFetchMe); 
-#endif //DIST
+#endif /*DIST */
       
     case FETCH_ME:
       ASSERT(LOOKS_LIKE_GA(((StgFetchMe *)p)->ga));
index c3efd36..962d38c 100644 (file)
@@ -20,7 +20,7 @@ extern void      stat_endRP(nat,
                             nat, int, 
 #endif
                             double);
-#endif // PROFILING
+#endif /* PROFILING */
 
 #if defined(PROFILING) || defined(DEBUG)
 extern void      stat_startHeapCensus(void);
@@ -41,7 +41,7 @@ extern double    mut_user_time(void);
 #ifdef PROFILING
 extern double    mut_user_time_during_RP(void);
 extern double    mut_user_time_during_heap_census(void);
-#endif // PROFILING
+#endif /* PROFILING */
 
 extern void      statDescribeGens( void );
 extern HsInt64   getAllocations( void );
index 5e08235..c67cce2 100644 (file)
@@ -15,6 +15,6 @@ StgPEId cGetCertainOwner(StgClosure *mv);
 void cRevalIO(StgClosure *job,StgPEId p);
 StgPEId cGetHostOwner(StgByteArray h);
 
-#endif // DIST
+#endif /* DIST */
 
-#endif // __DIST_H
+#endif /* __DIST_H */