completion: use callback from SDAG state variable, rather than resaving it
authorPhil Miller <mille121@illinois.edu>
Wed, 18 Apr 2012 23:08:33 +0000 (18:08 -0500)
committerPhil Miller <mille121@illinois.edu>
Wed, 18 Apr 2012 23:08:33 +0000 (18:08 -0500)
src/libs/ck-libs/completion/completion.ci
src/libs/ck-libs/completion/completion.h

index cfa0b56f4f3fccfc716ce9d58f5a29fc26abbc20..ae4d6ffdae6d2df359bb4387566a4e0e98c6753d 100644 (file)
@@ -14,7 +14,6 @@ module completion {
         running = true;
         prio = prio_;
         producers_total = num_producers;
-        cb = finish;
         if (!start.isInvalid())
           contribute(start);
       }
@@ -46,9 +45,8 @@ module completion {
 
       atomic "completion finished" {
         init();
-        CkAssert(!cb.isInvalid());
-        contribute(cb);
-        cb = CkCallback();
+        CkAssert(!finish.isInvalid());
+        contribute(finish);
       }
     };
 
index 294076037f2641ec030d531dd0a42049d53cf2b6..8f21fbde65bdb9532e5d8961e198201f269e8315 100644 (file)
@@ -18,7 +18,6 @@ private:
     int produced, consumed, unconsumed;
     int producers_total, producers_done_local, producers_done_global;
     int prio;
-    CkCallback cb;
     bool running;
 
     void init();