X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FParallel.h;h=e18fbe9b2c592f894969c95d46477d6bbc4fc2e9;hb=5c67b7e313b2455ca65d5aa5970d86889145e97e;hp=1ead4497f84b22f4cc88402e4dc68c9a6b4b56d0;hpb=dd4c28a9c706cce09ecc2c6f532969efa925532f;p=ghc-hetmet.git diff --git a/ghc/includes/Parallel.h b/ghc/includes/Parallel.h index 1ead449..e18fbe9 100644 --- a/ghc/includes/Parallel.h +++ b/ghc/includes/Parallel.h @@ -1,7 +1,4 @@ /* - Time-stamp: - $Id: Parallel.h,v 1.3 2000/03/31 03:09:35 hwloidl Exp $ - Definitions for GUM i.e. running on a parallel machine. This section contains definitions applicable only to programs compiled @@ -14,17 +11,19 @@ #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) @@ -63,14 +62,15 @@ # 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) /* @@ -80,16 +80,17 @@ 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; @@ -131,7 +134,7 @@ extern nat advisory_thread_count; extern rtsBool InGlobalGC; /* Are we in the midst of performing global GC */ -static ullong startTime; /* start of comp; in RtsStartup.c */ +extern ullong startTime; /* start of comp; in RtsStartup.c */ /* the spark pools proper */ extern rtsSpark *pending_sparks_hd[]; /* ptr to start of a spark pool */ @@ -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_ { @@ -289,11 +299,13 @@ typedef struct rtsPackBuffer_ { StgInt /* nat */ size; StgInt /* nat */ unpacked_size; StgTSO *tso; - StgBuffer *buffer; + 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 */