add Outputable instance for OccIfaceEq
[ghc-hetmet.git] / rts / parallel / HLC.h
1 /* --------------------------------------------------------------------------
2    Time-stamp: <Sun Mar 18 2001 20:16:14 Stardate: [-30]6349.22 hwloidl>
3
4    High Level Communications Header (HLC.h)
5
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    ----------------------------------------------------------------------- */
11
12 #ifndef __HLC_H
13 #define __HLC_H
14
15 #ifdef PAR
16
17 #include "LLC.h"
18
19 #define NEW_FISH_AGE           0
20 #define NEW_FISH_HISTORY       0
21 #define NEW_FISH_HUNGER        0
22 #define FISH_LIFE_EXPECTANCY  10
23
24
25 //@node GUM Message Sending and Unpacking Functions
26 //@subsection GUM Message Sending and Unpacking Functions
27
28 rtsBool  initMoreBuffers(void);
29
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);
37
38 //@node Message-Processing Functions
39 //@subsection Message-Processing Functions
40
41 rtsBool  processMessages(void);
42 void     processFetches(void);
43 void     processTheRealFetches(void);
44
45 //@node Miscellaneous Functions
46 //@subsection Miscellaneous Functions
47
48 void     prepareFreeMsgBuffers(void);
49 void     freeRemoteGA (int pe, globalAddr *ga);
50 void     sendFreeMessages(void);
51
52 GlobalTaskId  choosePE(void);
53 StgClosure   *createBlockedFetch (globalAddr ga, globalAddr rga);
54 void          waitForTermination(void);
55
56 /* Message bouncing (startup and shutdown, mainly) */
57 void          bounceFish(void);
58 void          bounceReval(void);
59
60 void          DebugPrintGAGAMap (globalAddr *gagamap, int nGAs);
61
62 #endif /* PAR */
63 #endif /* __HLC_H */