[project @ 1998-12-02 13:17:09 by simonm]
[ghc-hetmet.git] / ghc / rts / gum / HLC.h
1 /********************************************************************
2 *                 High Level Communications Header (HLC.h)          *
3 *                                                                   *
4 *  Contains the high-level definitions (i.e. communication          *
5 *  subsystem independent) used by GUM                               *
6 *  Phil Trinder, Glasgow University, 12 December 1994               *
7 *********************************************************************/
8
9 #ifndef __HLC_H
10 #define __HLC_H
11 #ifdef PAR
12
13 #include "LLC.h"
14
15 #define NEW_FISH_AGE        0
16 #define NEW_FISH_HISTORY    0
17 #define NEW_FISH_HUNGER     0
18 #define FISH_LIFE_EXPECTANCY 10
19
20 void sendFetch (globalAddr *ga, globalAddr *bqga, int load);
21 void sendResume (globalAddr *bqga, int nelem, P_ data);
22 void sendAck (GLOBAL_TASK_ID task, int ngas, globalAddr *gagamap);
23 void sendFish (GLOBAL_TASK_ID destPE, GLOBAL_TASK_ID origPE, int age, int history, int hunger);
24 void sendFree (GLOBAL_TASK_ID destPE, int nelem, P_ data);
25 void sendSchedule (GLOBAL_TASK_ID origPE, int nelem, P_ data);
26 void processMessages(void);
27 void processFetches(void);
28
29 void prepareFreeMsgBuffers(void);
30 void freeRemoteGA (int pe, globalAddr *ga);
31 void sendFreeMessages(void);
32
33 GLOBAL_TASK_ID choosePE(void);
34
35 void WaitForTermination(void);
36
37 void DebugPrintGAGAMap (globalAddr *gagamap, int nGAs);
38
39 void CommonUp (P_, P_);
40
41 #endif /* PAR */
42 #endif /* __HLC_H */