X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FSparks.h;h=37ca92ca3eb006b49fc34fb378f27a842e3ad8fc;hb=a7dff32d3a8c10c9bd2081f441285ed31a01d2c1;hp=cd62971ca008e9bab86187b99f4e2f5fdf66381d;hpb=b933b46923f9e67fbb20a62b9ccde5a9a3e8fb7e;p=ghc-hetmet.git diff --git a/ghc/rts/Sparks.h b/ghc/rts/Sparks.h index cd62971..37ca92c 100644 --- a/ghc/rts/Sparks.h +++ b/ghc/rts/Sparks.h @@ -1,14 +1,34 @@ /* ----------------------------------------------------------------------------- - * $Id: Sparks.h,v 1.1 2000/01/12 15:15:18 simonmar Exp $ + * $Id: Sparks.h,v 1.2 2000/03/31 03:09:36 hwloidl Exp $ * * (c) The GHC Team, 2000 * - * Sparking support for PAR and SMP versions of the RTS. - * + * Sparking support for GRAN, PAR and SMP versions of the RTS. + * * ---------------------------------------------------------------------------*/ +#if defined(GRAN) + +void findLocalSpark (rtsEvent *event, rtsBool *found_res, rtsSparkQ *spark_res); +rtsBool activateSpark (rtsEvent *event, rtsSparkQ spark); +rtsSpark *newSpark(StgClosure *node, nat name, nat gran_info, + nat size_info, nat par_info, nat local); +void add_to_spark_queue(rtsSpark *spark); +rtsSpark *delete_from_sparkq (rtsSpark *spark, PEs p, rtsBool dispose_too); +void disposeSpark(rtsSpark *spark); +void disposeSparkQ(rtsSparkQ spark); +void print_spark(rtsSpark *spark); +void print_sparkq(PEs proc); +void print_sparkq_stats(void); +nat spark_queue_len(PEs proc); +void markSparkQueue(void); + +#elif defined(PAR) || defined(SMP) + void initSparkPools( void ); void markSparkQueue( void ); -StgClosure * findSpark( void ); +StgClosure *findSpark( void ); rtsBool add_to_spark_queue( StgClosure *closure, StgSparkPool *pool ); void markSparkQueue( void ); + +#endif