+/*
+ The following macros are only needed for sanity checking (see Sanity.c).
+*/
+
+/* NB: this is PVM specific and should be updated for MPI etc
+ in PVM a task id (tid) is split into 2 parts: the id for the
+ physical processor it is running on and an index of tasks running
+ on a processor; PVM_PE_MASK indicates which part of a tid holds the
+ id of the physical processor (the other part of the word holds the
+ index on that processor)
+ MAX_PVM_PES and MAX_PVM_TIDS are maximal values for these 2 components
+ in GUM we have an upper bound for the total number of PVM PEs allowed:
+ it's MAX_PE defined in Parallel.h
+ to check the slot field of a GA we call a fct highest_slot which just
+ returns the internal counter
+*/
+#define PVM_PE_MASK 0xfffc0000
+#define MAX_PVM_PES MAX_PES
+#define MAX_PVM_TIDS MAX_PES
+
+#if 0
+#define LOOKS_LIKE_TID(tid) (((tid & PVM_PE_MASK) != 0) && \
+ (((tid & PVM_PE_MASK) + (tid & ~PVM_PE_MASK)) < MAX_PVM_TIDS))
+#define LOOKS_LIKE_SLOT(slot) (slot<=highest_slot())
+
+#define LOOKS_LIKE_GA(ga) (LOOKS_LIKE_TID((ga)->payload.gc.gtid) && \
+ LOOKS_LIKE_SLOT((ga)->payload.gc.slot))
+#else
+rtsBool looks_like_tid(StgInt tid);
+rtsBool looks_like_slot(StgInt slot);
+rtsBool looks_like_ga(globalAddr *ga);
+#define LOOKS_LIKE_TID(tid) looks_like_tid(tid)
+#define LOOKS_LIKE_GA(ga) looks_like_ga(ga)
+#endif /* 0 */
+