From: bdemsky <bdemsky>
Date: Thu, 30 Jun 2011 11:53:05 +0000 (+0000)
Subject: synchronization code in interrupt handler...fixes all but the rare bme core doesn... 
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6a00ef554842928492c32f98b8de9945fb7b39b8;p=IRC.git

synchronization code in interrupt handler...fixes all but the rare bme core doesn't start deadlocks
---

diff --git a/Robust/src/Runtime/bamboo/multicoremsg.c b/Robust/src/Runtime/bamboo/multicoremsg.c
index 420a6a80..12783afe 100644
--- a/Robust/src/Runtime/bamboo/multicoremsg.c
+++ b/Robust/src/Runtime/bamboo/multicoremsg.c
@@ -708,7 +708,7 @@ INLINE void processmsg_gcfinishpref_I() {
 #endif // GC_CACHE_ADAPT
 #endif // #ifdef MULTICORE_GC
 
-void processmg_req_notify_start() {
+void processmsg_req_notify_start() {
   startflag=true;
   if(BAMBOO_CHECK_SEND_MODE()) {
     cache_msg_1_I(STARTUPCORE,NOTIFYSTART);
@@ -717,7 +717,7 @@ void processmg_req_notify_start() {
   }  
 }
 
-void processmg_notify_start() {
+void processmsg_notify_start() {
   numconfirm--;
 }
 
diff --git a/Robust/src/Runtime/bamboo/multicoreruntime.c b/Robust/src/Runtime/bamboo/multicoreruntime.c
index 73835dd3..1ed250e8 100644
--- a/Robust/src/Runtime/bamboo/multicoreruntime.c
+++ b/Robust/src/Runtime/bamboo/multicoreruntime.c
@@ -755,7 +755,6 @@ inline void run(int argc, char** argv) {
   bool tocontinue = false;
   startflag = false;
   corenum = BAMBOO_GET_NUM_OF_CORE();
-
   // initialize runtime data structures
   initruntimedata();
   initCommunication();
@@ -764,11 +763,13 @@ inline void run(int argc, char** argv) {
     numconfirm=NUMCORES-1;
     for(int i=0;i<NUMCORES;i++) {
       if (i!=STARTUPCORE) {
-	send_msg_1(STARTUPCORE,REQ_NOTIFY_START);
+	send_msg_1(i,REQNOTIFYSTART);
       }
     }
     while(numconfirm!=0)
       ;
+    tprintf("start! \n");
+    bamboo_start_time = BAMBOO_GET_EXE_TIME();
   } else {
     while(!startflag)
       ;