blob: 9e8c7b847b8b4c78227bbe81a992a9c00d9596dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
/*
Time-stamp: <2005-03-30 12:02:33 simonmar>
RTS specific types.
*/
/* -------------------------------------------------------------------------
Generally useful typedefs
------------------------------------------------------------------------- */
#ifndef RTS_TYPES_H
#define RTS_TYPES_H
typedef unsigned int nat; /* at least 32 bits (like int) */
typedef unsigned long lnat; /* at least 32 bits */
#ifndef _MSC_VER
typedef unsigned long long ullong; /* at least 32 bits */
typedef long long llong;
#else
typedef unsigned __int64 ullong; /* at least 32 bits */
typedef __int64 llong;
#endif
/* ullong (64|128-bit) type: only include if needed (not ANSI) */
#if defined(__GNUC__)
#define LL(x) (x##LL)
#else
#define LL(x) (x##L)
#endif
typedef enum {
rtsFalse = 0,
rtsTrue
} rtsBool;
/*
Types specific to the parallel runtime system.
*/
typedef ullong rtsTime;
#if defined(PAR)
/* types only needed in the parallel system */
typedef struct hashtable ParHashTable;
typedef struct hashlist ParHashList;
/* typedef double REAL_TIME; */
/* typedef W_ TIME; */
/* typedef GlobalTaskId Proc; */
typedef int GlobalTaskId;
typedef GlobalTaskId PEs;
typedef unsigned int rtsWeight;
typedef int rtsPacket;
typedef int OpCode;
/* Global addresses i.e. unique ids in a parallel setup; needed in Closures.h*/
typedef struct {
union {
StgPtr plc;
struct {
GlobalTaskId gtid;
int slot;
} gc;
} payload;
rtsWeight weight;
} globalAddr;
/* (GA, LA) pairs */
typedef struct gala {
globalAddr ga;
StgPtr la;
struct gala *next;
rtsBool preferred;
} GALA;
#elif defined(GRAN)
/*
* GlobalTaskId is dummy in GranSim;
* we define it to have cleaner code in the RTS
*/
typedef int GlobalTaskId;
typedef lnat rtsTime;
typedef StgWord PEs;
#endif
#endif /* RTS_TYPES_H */
|