switch to a thread local stall sem for parent to give to children, tinker with prefet...
[IRC.git] / Robust / src / Runtime / mlp_runtime.h
index e6482ba033c5bb798c7cf95e0976fc39f624c3cd..c7dce30f2a7d0481de8b69e4ea84213c5b1832b3 100644 (file)
@@ -85,9 +85,10 @@ typedef struct SESEcommon_t {
   // the task record so task dispatch works correctly!
   int classID;
 
+
   // a parent waits on this semaphore when stalling on
   // this child, the child gives it at its SESE exit
-  psemaphore stallSem;
+  psemaphore* parentsStallSem;
 
   
   // the lock guards the following data SESE's
@@ -110,9 +111,6 @@ typedef struct SESEcommon_t {
 
   struct SESEcommon_t*   parent;
 
-  //psemaphore parentStallSem;
-  //pthread_cond_t stallDone;
-
   int numMemoryQueue;
   int rentryIdx;
   int unresolvedRentryIdx;
@@ -138,6 +136,11 @@ typedef struct SESEcommon_t {
 // running task
 extern __thread SESEcommon* runningSESE;
 
+// there only needs to be one stall semaphore
+// per thread, just give a reference to it to
+// the task you are about to block on
+extern __thread psemaphore runningSESEstallSem;
+
 
 
 typedef struct REntry_t{