1 /* --------------------------------------------------------------------------
2 Time-stamp: <Sun Mar 18 2001 20:16:14 Stardate: [-30]6349.22 hwloidl>
3 $Id: HLC.h,v 1.3 2001/03/22 03:51:11 hwloidl Exp $
5 High Level Communications Header (HLC.h)
7 Contains the high-level definitions (i.e. communication
8 subsystem independent) used by GUM
9 Phil Trinder, Glasgow University, 12 December 1994
10 H-W. Loidl, Heriot-Watt, November 1999
11 ----------------------------------------------------------------------- */
20 #define NEW_FISH_AGE 0
21 #define NEW_FISH_HISTORY 0
22 #define NEW_FISH_HUNGER 0
23 #define FISH_LIFE_EXPECTANCY 10
26 //@node GUM Message Sending and Unpacking Functions
27 //@subsection GUM Message Sending and Unpacking Functions
29 rtsBool initMoreBuffers(void);
31 void sendFetch (globalAddr *ga, globalAddr *bqga, int load);
32 void sendResume(globalAddr *rga, int nelem, rtsPackBuffer *packBuffer);
33 void sendAck (GlobalTaskId task, int ngas, globalAddr *gagamap);
34 void sendFish (GlobalTaskId destPE, GlobalTaskId origPE, int age, int history, int hunger);
35 void sendFree (GlobalTaskId destPE, int nelem, P_ data);
36 void sendSchedule(GlobalTaskId origPE, int nelem, rtsPackBuffer *packBuffer);
37 void sendReval(GlobalTaskId origPE, int nelem, rtsPackBuffer *data);
39 //@node Message-Processing Functions
40 //@subsection Message-Processing Functions
42 rtsBool processMessages(void);
43 void processFetches(void);
44 void processTheRealFetches(void);
46 //@node Miscellaneous Functions
47 //@subsection Miscellaneous Functions
49 void prepareFreeMsgBuffers(void);
50 void freeRemoteGA (int pe, globalAddr *ga);
51 void sendFreeMessages(void);
53 GlobalTaskId choosePE(void);
54 StgClosure *createBlockedFetch (globalAddr ga, globalAddr rga);
55 void waitForTermination(void);
57 /* Message bouncing (startup and shutdown, mainly) */
58 void bounceFish(void);
59 void bounceReval(void);
61 void DebugPrintGAGAMap (globalAddr *gagamap, int nGAs);