[project @ 2005-01-27 11:55:37 by simonmar]
[ghc-hetmet.git] / ghc / rts / parallel / Pack.c
index 7d785d9..e8653f6 100644 (file)
@@ -1,6 +1,5 @@
 /* 
    Time-stamp: <Wed Mar 21 2001 16:32:47 Stardate: [-30]6363.44 hwloidl>
 /* 
    Time-stamp: <Wed Mar 21 2001 16:32:47 Stardate: [-30]6363.44 hwloidl>
-   $Id: Pack.c,v 1.6 2001/03/22 03:51:11 hwloidl Exp $
 
    Graph packing and unpacking code for sending it to another processor
    and retrieving the original graph structure from the packet.
 
    Graph packing and unpacking code for sending it to another processor
    and retrieving the original graph structure from the packet.
@@ -822,7 +821,7 @@ PackRemoteRef(StgClosure *closure)
   
   unpacked_size += PACK_FETCHME_SIZE;
 }
   
   unpacked_size += PACK_FETCHME_SIZE;
 }
-#endif DIST
+#endif /* DIST */
 
 //@node Packing Closures,  , Packing Sections of Nearby Graph, Packing Functions
 //@subsubsection Packing Closures
 
 //@node Packing Closures,  , Packing Sections of Nearby Graph, Packing Functions
 //@subsubsection Packing Closures
@@ -1339,7 +1338,7 @@ PackPAP(StgPAP *pap) {
   nat n, i, j, pack_start;
   StgPtr p, q;
   const StgInfoTable* info;
   nat n, i, j, pack_start;
   StgPtr p, q;
   const StgInfoTable* info;
-  StgWord32 bitmap;
+  StgWord bitmap;
   /* debugging only */
   StgPtr end;
   nat size, ptrs, nonptrs, vhs;
   /* debugging only */
   StgPtr end;
   nat size, ptrs, nonptrs, vhs;
@@ -1615,7 +1614,7 @@ PackPAP(StgPAP *pap) {
 
        for (j=0; j<large_bitmap->size; j++) {
          bitmap = large_bitmap->bitmap[j];
 
        for (j=0; j<large_bitmap->size; j++) {
          bitmap = large_bitmap->bitmap[j];
-         q = p + sizeof(W_) * 8;
+         q = p + BITS_IN(W_);
          while (bitmap != 0) {
            if ((bitmap & 1) == 0) {
              Pack((StgWord)(ARGTAG_MAX+1));
          while (bitmap != 0) {
            if ((bitmap & 1) == 0) {
              Pack((StgWord)(ARGTAG_MAX+1));
@@ -2230,7 +2229,7 @@ SetGAandCommonUp(globalAddr *ga, StgClosure *closure, rtsBool hasGA)
     ga->weight=0;
 // ***************************************************************************
 // ***************************************************************************
     ga->weight=0;
 // ***************************************************************************
 // ***************************************************************************
-#endif DIST
+#endif /* DIST */
     
     /* Two closures, one global name.  Someone loses */
     oldip = get_itbl(existing);
     
     /* Two closures, one global name.  Someone loses */
     oldip = get_itbl(existing);
@@ -2873,7 +2872,7 @@ UnpackPAP(StgWord ***bufptrP, StgClosure *graph)
   nat n, i, j, packed_size = 0;
   StgPtr p, q, end, payload_start, p_FMs;
   const StgInfoTable* info;
   nat n, i, j, packed_size = 0;
   StgPtr p, q, end, payload_start, p_FMs;
   const StgInfoTable* info;
-  StgWord32 bitmap;
+  StgWord bitmap;
   StgWord **bufptr = *bufptrP;
 #if defined(DEBUG)
   nat FMs_in_PAP=0;
   StgWord **bufptr = *bufptrP;
 #if defined(DEBUG)
   nat FMs_in_PAP=0;
@@ -3092,7 +3091,7 @@ UnpackPAP(StgWord ***bufptrP, StgClosure *graph)
 
        for (j=0; j<large_bitmap->size; j++) {
          bitmap = large_bitmap->bitmap[j];
 
        for (j=0; j<large_bitmap->size; j++) {
          bitmap = large_bitmap->bitmap[j];
-         q = p + sizeof(W_) * 8;
+         q = p + BITS_IN(W_);
          while (bitmap != 0) {
            if ((bitmap & 1) == 0) {
              *p++ = (StgWord)UnpackFetchMe(&bufptr, (StgClosure**)&p_FMs);
          while (bitmap != 0) {
            if ((bitmap & 1) == 0) {
              *p++ = (StgWord)UnpackFetchMe(&bufptr, (StgClosure**)&p_FMs);