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