More code clean
authorjzhou <jzhou>
Tue, 10 May 2011 01:20:04 +0000 (01:20 +0000)
committerjzhou <jzhou>
Tue, 10 May 2011 01:20:04 +0000 (01:20 +0000)
14 files changed:
Robust/src/Runtime/bamboo/multicorecache.c
Robust/src/Runtime/bamboo/multicoregarbage.c
Robust/src/Runtime/bamboo/multicoregarbage.h
Robust/src/Runtime/bamboo/multicoregccompact.c
Robust/src/Runtime/bamboo/multicoregcflush.c
Robust/src/Runtime/bamboo/multicoregcmark.c
Robust/src/Runtime/bamboo/multicoregcprofile.h
Robust/src/Runtime/bamboo/multicoremsg.c
Robust/src/Runtime/bamboo/multicoremsg.h
Robust/src/Runtime/bamboo/multicoreruntime.c
Robust/src/Runtime/bamboo/multicoreruntime.h
Robust/src/Runtime/bamboo/multicoretask.c
Robust/src/Runtime/bamboo/multicoretask.h
Robust/src/Runtime/runtime.h

index 70dddbe09b96b21bf73628358062fd434c2abbcc..812a77893a0a09e270e7f80d5d60bb84e059a0b4 100644 (file)
@@ -553,7 +553,7 @@ void cacheAdapt_phase_client() {
   cacheAdapt_mutator();
   cacheAdapt_gc(false);
   //send init finish msg to core coordinator
-  send_msg_2(STARTUPCORE, GCFINISHPREF, BAMBOO_NUM_OF_CORE, false);
+  send_msg_2(STARTUPCORE, GCFINISHPREF, BAMBOO_NUM_OF_CORE);
   GC_PRINTF("Finish prefinish phase\n");
   CACHEADAPT_SAMPING_RESET();
   if(BAMBOO_NUM_OF_CORE < NUMCORESACTIVE) {
index 6de5d5666c412dda9b614068eb51bca987cdd969..8a42ae66ccc4593e650c1f46e08253f67438cf1f 100644 (file)
@@ -629,8 +629,7 @@ void gc_collect(struct garbagelist * stackptr) {
   gcprocessing = true;
   // inform the master that this core is at a gc safe point and is ready to 
   // do gc
-  send_msg_4(STARTUPCORE, GCFINISHPRE, BAMBOO_NUM_OF_CORE, self_numsendobjs, 
-            self_numreceiveobjs, false);
+  send_msg_4(STARTUPCORE,GCFINISHPRE,BAMBOO_NUM_OF_CORE,self_numsendobjs,self_numreceiveobjs);
 
   // core collector routine
   //wait for init phase
@@ -640,7 +639,7 @@ void gc_collect(struct garbagelist * stackptr) {
   initGC();
   CACHEADAPT_GC(true);
   //send init finish msg to core coordinator
-  send_msg_2(STARTUPCORE, GCFINISHINIT, BAMBOO_NUM_OF_CORE, false);
+  send_msg_2(STARTUPCORE,GCFINISHINIT,BAMBOO_NUM_OF_CORE);
 
   //wait for mark phase
   WAITFORGCPHASE(MARKPHASE);
@@ -675,8 +674,7 @@ void gc_nocollect(struct garbagelist * stackptr) {
   gcprocessing = true;
   // inform the master that this core is at a gc safe point and is ready to 
   // do gc
-  send_msg_4(STARTUPCORE, GCFINISHPRE, BAMBOO_NUM_OF_CORE, self_numsendobjs, 
-    self_numreceiveobjs, false);
+  send_msg_4(STARTUPCORE,GCFINISHPRE,BAMBOO_NUM_OF_CORE,self_numsendobjs,self_numreceiveobjs);
   
   WAITFORGCPHASE(INITPHASE);
 
@@ -684,7 +682,7 @@ void gc_nocollect(struct garbagelist * stackptr) {
   initGC();
   CACHEADAPT_GC(true);
   //send init finish msg to core coordinator
-  send_msg_2(STARTUPCORE, GCFINISHINIT, BAMBOO_NUM_OF_CORE, false);
+  send_msg_2(STARTUPCORE,GCFINISHINIT,BAMBOO_NUM_OF_CORE);
 
   WAITFORGCPHASE(MARKPHASE);
 
@@ -734,7 +732,7 @@ void master_getlargeobjs() {
   // Note: only need to ask gc cores, non-gc cores do not host any objs
   numconfirm = NUMCORES4GC - 1;
   for(int i = 1; i < NUMCORES4GC; i++) {
-    send_msg_1(i, GCLOBJREQUEST, false);
+    send_msg_1(i,GCLOBJREQUEST);
   }
   gcloads[BAMBOO_NUM_OF_CORE] = gccurr_heaptop;
   //spin until we have all responses
@@ -773,14 +771,14 @@ void master_compact() {
     if (tmpcoreptr < tmpheaptop) {
       gcstopblock[i] = numpbc + 1;
       if(i != STARTUPCORE) {
-        send_msg_2(i, GCSTARTCOMPACT, numpbc+1, false);
+        send_msg_2(i, GCSTARTCOMPACT, numpbc+1);
       } else {
         gcblock2fill = numpbc+1;
       }
     } else {
       gcstopblock[i] = numpbc;
       if(i != STARTUPCORE) {
-        send_msg_2(i, GCSTARTCOMPACT, numpbc, false);
+        send_msg_2(i, GCSTARTCOMPACT, numpbc);
       } else {
         gcblock2fill = numpbc;
       }
index 9fa1ac310b873c07ec56d77d9ce6d918bfc9e602..b7fcbb88016d4389d6af09e3d342060286c49f0c 100644 (file)
@@ -222,7 +222,7 @@ unsigned int size_cachepolicytbl;
     for(int i = 0; i < NUMCORESACTIVE; ++i) { \
       gccorestatus[i] = 1; \
       if(BAMBOO_NUM_OF_CORE != i) { \
-        send_msg_1(i, (m), false); \
+        send_msg_1(i, (m)); \
       } \
     } \
   }
index cfada61b6fcb30d3ee19e87f9709eafb2082e1c4..d3abf117e04d83040da3a4838680ba3722e93207 100644 (file)
@@ -92,9 +92,9 @@ INLINE void compact2Heaptophelper_I(unsigned int coren,
     gcblock2fill = *numblocks + 1;
   } else {
     if(BAMBOO_CHECK_SEND_MODE()) {
-      cache_msg_4(coren,GCMOVESTART,gctopcore,*p,(*numblocks)+1);
+      cache_msg_4_I(coren,GCMOVESTART,gctopcore,*p,(*numblocks)+1);
     } else {
-      send_msg_4(coren, GCMOVESTART, gctopcore, *p, (*numblocks) + 1, true);
+      send_msg_4_I(coren,GCMOVESTART,gctopcore,*p,(*numblocks)+1);
     }
   }
   if(memneed < *remain) {
@@ -202,7 +202,7 @@ INLINE void resolvePendingMoveRequest() {
        gcmovestartaddr = startaddr;
        gcblock2fill = tomove;
       } else {
-       send_msg_4(dstcore, GCMOVESTART, sourcecore,startaddr, tomove, false);
+       send_msg_4(dstcore,GCMOVESTART,sourcecore,startaddr,tomove);
       }
       gcmovepending--;
       nosparemem = true;
@@ -545,12 +545,10 @@ innercompact:
     if((unsigned int)(orig->ptr) < (unsigned int)gcmarkedptrbound) {
       // ask for more mem
       gctomove = false;
-      send_msg_5(STARTUPCORE, GCFINISHCOMPACT, BAMBOO_NUM_OF_CORE,
-                 *filledblocks, *heaptopptr, gccurr_heaptop, false);
+      send_msg_5(STARTUPCORE,GCFINISHCOMPACT,BAMBOO_NUM_OF_CORE,*filledblocks,*heaptopptr,gccurr_heaptop);
     } else {
       // finish compacting
-      send_msg_5(STARTUPCORE, GCFINISHCOMPACT, BAMBOO_NUM_OF_CORE,
-                 *filledblocks, *heaptopptr, 0, false);
+      send_msg_5(STARTUPCORE,GCFINISHCOMPACT,BAMBOO_NUM_OF_CORE,*filledblocks,*heaptopptr, 0);
     }
   } 
 
@@ -586,8 +584,7 @@ void compact() {
   if(!initOrig_Dst(orig, to)) {
     // no available data to compact
     // send compact finish msg to STARTUP core
-    send_msg_5(STARTUPCORE, GCFINISHCOMPACT, BAMBOO_NUM_OF_CORE,
-               0, to->base, 0, false);
+    send_msg_5(STARTUPCORE,GCFINISHCOMPACT,BAMBOO_NUM_OF_CORE,0,to->base,0);
     RUNFREE(orig);
     RUNFREE(to);
   } else {
index 925cad92701574643a78506b64f86980e69d9d8e..8a5e96d3bda3f19a989426435c951dbc2b51aa59 100644 (file)
@@ -210,7 +210,7 @@ void flush(struct garbagelist * stackptr) {
   if(STARTUPCORE == BAMBOO_NUM_OF_CORE) {
     gccorestatus[BAMBOO_NUM_OF_CORE] = 0;
   } else {
-    send_msg_2(STARTUPCORE, GCFINISHFLUSH, BAMBOO_NUM_OF_CORE, false);
+    send_msg_2(STARTUPCORE,GCFINISHFLUSH,BAMBOO_NUM_OF_CORE);
   }
 } 
 
index 72ddd5fa6f576392754319983aae65c8734e68ba..849916962caf91a548c164362d57ab49a6057ccb 100644 (file)
@@ -88,7 +88,7 @@ INLINE void markObj(void * objptr) {
     // check if this obj has been forwarded
     if(!MGCHashcontains(gcforwardobjtbl, (int)objptr)) {
       // send a msg to host informing that objptr is active
-      send_msg_2(host, GCMARKEDOBJ, objptr, false);
+      send_msg_2(host,GCMARKEDOBJ,objptr);
       GCPROFILE_RECORD_FORWARD_OBJ();
       gcself_numsendobjs++;
       MGCHashadd(gcforwardobjtbl, (int)objptr);
@@ -304,7 +304,7 @@ INLINE void mark(bool isfirst, struct garbagelist * stackptr) {
       gcloads[BAMBOO_NUM_OF_CORE] = gccurr_heaptop;
     } else {
       if(!sendStall) {
-        send_msg_4(STARTUPCORE, GCFINISHMARK, BAMBOO_NUM_OF_CORE,gcself_numsendobjs, gcself_numreceiveobjs, false);
+        send_msg_4(STARTUPCORE,GCFINISHMARK,BAMBOO_NUM_OF_CORE,gcself_numsendobjs,gcself_numreceiveobjs);
         sendStall = true;
       }
     }
index 53d8f7d31631f180c822d63c739bc59ae39035be..d6ffeff3901db27d1c913fceecc5e52aaecdfa31 100644 (file)
@@ -48,7 +48,7 @@ void gc_outputProfileData();
 #define GCPROFILE_INFO_2_MASTER() \
   { \
     if(STARTUPCORE != BAMBOO_NUM_OF_CORE) { \
-      send_msg_4(STARTUPCORE,GCPROFILES,gc_num_obj,gc_num_liveobj,gc_num_forwardobj, false); \
+      send_msg_4(STARTUPCORE,GCPROFILES,gc_num_obj,gc_num_liveobj,gc_num_forwardobj); \
     }\
     gc_num_obj = 0; \
   }
index e3466bff4610e8d56dd3d56988ee5a94541225e0..a2880cc184fab43ccded8383b7e84d00599072e4 100644 (file)
@@ -99,9 +99,12 @@ INLINE int checkMsgLength_I(int size) {
   }
 
   default:
+  {
+    tprintf("%x \n", type);
     BAMBOO_EXIT();
     break;
   }
+  }
   return BAMBOO_OUT_BUF_LENGTH;
 }
 
@@ -146,9 +149,9 @@ INLINE void processmsg_transobj_I(int msglength) {
     } else {
       // send a update pregc information msg to the master core
       if(BAMBOO_CHECK_SEND_MODE()) {
-        cache_msg_4(STARTUPCORE,GCFINISHPRE,BAMBOO_NUM_OF_CORE,self_numsendobjs,self_numreceiveobjs);
+        cache_msg_4_I(STARTUPCORE,GCFINISHPRE,BAMBOO_NUM_OF_CORE,self_numsendobjs,self_numreceiveobjs);
       } else {
-        send_msg_4(STARTUPCORE,GCFINISHPRE,BAMBOO_NUM_OF_CORE,self_numsendobjs, self_numreceiveobjs,true);
+        send_msg_4_I(STARTUPCORE,GCFINISHPRE,BAMBOO_NUM_OF_CORE,self_numsendobjs, self_numreceiveobjs);
       }
     }
   }
@@ -190,9 +193,9 @@ INLINE void processmsg_lockrequest_I() {
     // for 32 bit machine, the size is always 4 words, cache the msg first
     int tmp = deny==1 ? LOCKDENY : LOCKGROUNT;
     if(BAMBOO_CHECK_SEND_MODE()) {
-      cache_msg_4(data4, tmp, locktype, data2, data3);
+      cache_msg_4_I(data4,tmp,locktype,data2,data3);
     } else {
-      send_msg_4(data4, tmp, locktype, data2, data3, true);
+      send_msg_4_I(data4,tmp,locktype,data2,data3);
     }
   }
 }
@@ -255,9 +258,9 @@ INLINE void processmsg_redirectlock_I() {
     // send response msg
     // for 32 bit machine, the size is always 4 words, cache the msg first
     if(BAMBOO_CHECK_SEND_MODE()) {
-      cache_msg_4(data4,deny==1?REDIRECTDENY:REDIRECTGROUNT,data1,data2,data3);
+      cache_msg_4_I(data4,deny==1?REDIRECTDENY:REDIRECTGROUNT,data1,data2,data3);
     } else {
-      send_msg_4(data4,deny==1?REDIRECTDENY:REDIRECTGROUNT,data1,data2,data3,true);
+      send_msg_4_I(data4,deny==1?REDIRECTDENY:REDIRECTGROUNT,data1,data2,data3);
     }
   }
 }
@@ -316,9 +319,9 @@ INLINE void processmsg_profileoutput_I() {
 #endif
   // cache the msg first
   if(BAMBOO_CHECK_SEND_MODE()) {
-    cache_msg_2(STARTUPCORE, PROFILEFINISH, BAMBOO_NUM_OF_CORE);
+    cache_msg_2_I(STARTUPCORE,PROFILEFINISH,BAMBOO_NUM_OF_CORE);
   } else {
-    send_msg_2(STARTUPCORE, PROFILEFINISH, BAMBOO_NUM_OF_CORE, true);
+    send_msg_2_I(STARTUPCORE,PROFILEFINISH,BAMBOO_NUM_OF_CORE);
   }
 }
 
@@ -335,9 +338,9 @@ INLINE void processmsg_statusconfirm_I() {
   // send response msg
   // cache the msg first
   if(BAMBOO_CHECK_SEND_MODE()) {
-    cache_msg_5(STARTUPCORE,STATUSREPORT,busystatus?1:0,BAMBOO_NUM_OF_CORE,self_numsendobjs,self_numreceiveobjs);
+    cache_msg_5_I(STARTUPCORE,STATUSREPORT,busystatus?1:0,BAMBOO_NUM_OF_CORE,self_numsendobjs,self_numreceiveobjs);
   } else {
-    send_msg_5(STARTUPCORE,STATUSREPORT,busystatus?1:0,BAMBOO_NUM_OF_CORE,self_numsendobjs,self_numreceiveobjs,true);
+    send_msg_5_I(STARTUPCORE,STATUSREPORT,busystatus?1:0,BAMBOO_NUM_OF_CORE,self_numsendobjs,self_numreceiveobjs);
   }
 }
 
@@ -388,9 +391,9 @@ INLINE void processmsg_memrequest_I() {
     if(mem != NULL) {
       // send the start_va to request core, cache the msg first
       if(BAMBOO_CHECK_SEND_MODE()) {
-        cache_msg_3(data2, MEMRESPONSE, mem, allocsize);
+        cache_msg_3_I(data2,MEMRESPONSE,mem,allocsize);
       } else {
-        send_msg_3(data2, MEMRESPONSE, mem, allocsize, true);
+        send_msg_3_I(data2,MEMRESPONSE,mem,allocsize);
       }
     } //else if mem == NULL, the gcflag of the startup core has been set
     // and all the other cores have been informed to start gc
@@ -553,9 +556,9 @@ INLINE void processmsg_gcfinishcompact_I() {
       if(gcfindSpareMem_I(&startaddr, &tomove, &dstcore, data4, cnum)) {
         // cache the msg first
         if(BAMBOO_CHECK_SEND_MODE()) {
-          cache_msg_4(cnum, GCMOVESTART, dstcore, startaddr, tomove);
+          cache_msg_4_I(cnum,GCMOVESTART,dstcore,startaddr,tomove);
         } else {
-          send_msg_4(cnum, GCMOVESTART, dstcore, startaddr, tomove, true);
+          send_msg_4_I(cnum,GCMOVESTART,dstcore,startaddr,tomove);
         }
       }
     } else {
@@ -587,9 +590,9 @@ INLINE void processmsg_gcmarkconfirm_I() {
   gcbusystatus = gc_moreItems2_I();
   // send response msg, cahce the msg first
   if(BAMBOO_CHECK_SEND_MODE()) {
-    cache_msg_5(STARTUPCORE,GCMARKREPORT,BAMBOO_NUM_OF_CORE,gcbusystatus,gcself_numsendobjs,gcself_numreceiveobjs);
+    cache_msg_5_I(STARTUPCORE,GCMARKREPORT,BAMBOO_NUM_OF_CORE,gcbusystatus,gcself_numsendobjs,gcself_numreceiveobjs);
   } else {
-    send_msg_5(STARTUPCORE,GCMARKREPORT,BAMBOO_NUM_OF_CORE,gcbusystatus,gcself_numsendobjs,gcself_numreceiveobjs, true);
+    send_msg_5_I(STARTUPCORE,GCMARKREPORT,BAMBOO_NUM_OF_CORE,gcbusystatus,gcself_numsendobjs,gcself_numreceiveobjs);
   }
 }
 
@@ -724,13 +727,11 @@ INLINE void processmsg_gcfinishpref_I() {
 //               3--received a lock Msg
 //               RAW version: -1 -- received nothing
 //                            otherwise -- received msg type
-int receiveObject(int send_port_pending) {
+int receiveObject_I() {
   PROFILE_INTERRUPT_START(); 
 msg:
   // get the incoming msgs
-  if(receiveMsg(send_port_pending) == -1) {
-    return -1;
-  }
+  receiveMsg_I();
   if(BAMBOO_CHECK_SEND_MODE()) {
     // during send, don't process the msg now
     return -3; 
index 1069ec89596521ac6e1e7157d10cd09692ead657..cea4adc675ae69801634721718bf0746124f2c62 100644 (file)
@@ -207,20 +207,25 @@ typedef enum {
 } MSGTYPE;
 
 // msg related functions
-void send_hanging_msg(bool isInterrupt);
-void send_msg_1(int targetcore,unsigned long n0,bool isInterrupt);
-void send_msg_2(int targetcore,unsigned long n0,unsigned long n1,bool isInterrupt);
-void send_msg_3(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2,bool isInterrupt);
-void send_msg_4(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2,unsigned long n3,bool isInterrupt);
-void send_msg_5(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2,unsigned long n3,unsigned long n4,bool isInterrupt);
-void send_msg_6(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2,unsigned long n3,unsigned long n4,unsigned long n5,bool isInterrupt);
-void cache_msg_1(int targetcore,unsigned long n0);
-void cache_msg_2(int targetcore,unsigned long n0,unsigned long n1);
-void cache_msg_3(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2);
-void cache_msg_4(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2,unsigned long n3);
-void cache_msg_5(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2,unsigned long n3,unsigned long n4);
-void cache_msg_6(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2,unsigned long n3,unsigned long n4,unsigned long n5);
-int receiveMsg(unsigned int send_port_pending);
+void send_msg_1(int targetcore,unsigned long n0);
+void send_msg_2(int targetcore,unsigned long n0,unsigned long n1);
+void send_msg_3(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2);
+void send_msg_4(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2,unsigned long n3);
+void send_msg_5(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2,unsigned long n3,unsigned long n4);
+void send_msg_6(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2,unsigned long n3,unsigned long n4,unsigned long n5);
+void send_msg_1_I(int targetcore,unsigned long n0);
+void send_msg_2_I(int targetcore,unsigned long n0,unsigned long n1);
+void send_msg_3_I(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2);
+void send_msg_4_I(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2,unsigned long n3);
+void send_msg_5_I(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2,unsigned long n3,unsigned long n4);
+void send_msg_6_I(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2,unsigned long n3,unsigned long n4,unsigned long n5);
+void cache_msg_1_I(int targetcore,unsigned long n0);
+void cache_msg_2_I(int targetcore,unsigned long n0,unsigned long n1);
+void cache_msg_3_I(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2);
+void cache_msg_4_I(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2,unsigned long n3);
+void cache_msg_5_I(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2,unsigned long n3,unsigned long n4);
+void cache_msg_6_I(int targetcore,unsigned long n0,unsigned long n1,unsigned long n2,unsigned long n3,unsigned long n4,unsigned long n5);
+int receiveMsg_I();
 #ifdef TASK
 void transferObject(struct transObjInfo * transObj);
 #endif
index 084f4a04db86a76fca3422780c0ab6336da11dff..2f1d5c221853e2f5e6aed9bda8993d24e1f3bc3e 100644 (file)
@@ -645,7 +645,7 @@ INLINE void getprofiledata_I() {
   BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME();
   for(i = 1; i < NUMCORESACTIVE; ++i) {
     // send profile request msg to core i
-    send_msg_2(i, PROFILEOUTPUT, totalexetime, false);
+    send_msg_2(i, PROFILEOUTPUT, totalexetime);
   } 
 #ifndef RT_TEST
   // pour profiling data on startup core
@@ -710,7 +710,7 @@ INLINE void checkCoreStatus() {
           for(i = 1; i < NUMCORESACTIVE; ++i) {
             corestatus[i] = 1;
             // send status confirm msg to core i
-            send_msg_1(i, STATUSCONFIRM, false);
+            send_msg_1(i, STATUSCONFIRM);
           }   
           return;
         } else {
@@ -802,7 +802,7 @@ inline void run(int argc, char** argv) {
         sendStall = false;
       }
 #ifndef INTERRUPT
-      while(receiveObject() != -1) {
+      while(receiveObject_I() != -1) {
       }
 #endif
       // check if there are some pending objects,
@@ -836,7 +836,7 @@ inline void run(int argc, char** argv) {
             } else {
               // send StallMsg to startup core
               // send stall msg
-              send_msg_4(STARTUPCORE, TRANSTALL, BAMBOO_NUM_OF_CORE,self_numsendobjs, self_numreceiveobjs, false);
+              send_msg_4(STARTUPCORE,TRANSTALL,BAMBOO_NUM_OF_CORE,self_numsendobjs,self_numreceiveobjs);
               sendStall = true;
               isfirst = true;
               busystatus = false;
index a26cf0a26288efc7c4e9a3b9ddbc653975c02306..9041d74ae01a99bbb827d6f7a713aff59d68e635 100644 (file)
@@ -105,7 +105,7 @@ INLINE void terminatememprof(void);
 //                                        send mode                        //
 // BAMBOO_ENTER_SEND_MODE_FROM_RUNTIME(): change to send mode from         //
 //                                        runtime mode                     //
-// BAMBOO_WAITING_FOR_LOCK(): routine executed while waiting for lock      //
+// BAMBOO_WAITING_FOR_LOCK_I(): routine executed while waiting for lock    //
 //                            request response                             //
 // BAMBOO_LOCAL_MEM_CALLOC(x, y): allocate an array of x elements each of  //
 //                                whose size in bytes is y on local memory //
index d4b6f329ac5ae26ee2f6a39286425f7bedccb586..5c922fd8d8fd4edf58dff46af9483ea890a012fb 100644 (file)
@@ -109,7 +109,7 @@ INLINE bool checkObjQueue() {
     }
     getwritelock_I(tmpobj);
     while(!lockflag) {
-      BAMBOO_WAITING_FOR_LOCK(0);
+      BAMBOO_WAITING_FOR_LOCK_I();
     } 
     grount = lockresult;
 
@@ -968,7 +968,7 @@ void releasewritelock_r(void * lock, void * redirectlock) {
   } else {
     // send lock release with redirect info msg
     // for 32 bit machine, the size is always 4 words
-    send_msg_4(targetcore,REDIRECTRELEASE,1,(int)lock,(int)redirectlock,false);
+    send_msg_4(targetcore,REDIRECTRELEASE,1,(int)lock,(int)redirectlock);
   }
 }
 #endif
@@ -1054,11 +1054,11 @@ newtask:
       getwritelock(lock);
       BAMBOO_ENTER_RUNTIME_MODE_FROM_CLIENT();
       while(!lockflag) {
-        BAMBOO_WAITING_FOR_LOCK(0);
+        BAMBOO_WAITING_FOR_LOCK_I();
       }
 #ifndef INTERRUPT
       if(reside) {
-        while(BAMBOO_WAITING_FOR_LOCK(0) != -1) {
+        while(BAMBOO_WAITING_FOR_LOCK_I() != -1) {
         }
       }
 #endif
index d15d235899584e8dd2654f8e6523020852ef4a5a..e6f1c43d29f49deac7dfaa44ebc509fdaf751392 100644 (file)
@@ -39,7 +39,7 @@ void releasewritelock_I(void * ptr);
 void releasewritelock_r(void * lock, void * redirectlock);
 #endif // ifndef MULTICORE_GC
 /* this function is to process lock requests.
- * can only be invoked in receiveObject() */
+ * can only be invoked in receiveObject_I() */
 // if return -1: the lock request is redirected
 //            0: the lock request is approved
 //            1: the lock request is denied
index 1b70ea0023518ac83ae54474da0c046d561697df..620440cd2ab8f95ff97150b44506a64d934a8835 100644 (file)
@@ -150,7 +150,7 @@ void createstartupobject();
 #ifdef MULTICORE
 #include "SimpleHash.h"
 inline void run(int argc, char** argv);
-int receiveObject(int send_port_pending);
+int receiveObject_I();
 void * smemalloc_I(int coren, int size, int * allocsize);
 #ifdef MULTICORE_GC
 inline void setupsmemmode(void);