]> vgcfreebox.myrthtech.pt Git - ue-pp-terminationdetectionalgorithm.git/blobdiff - util.c
improved control-skeleton.c
[ue-pp-terminationdetectionalgorithm.git] / util.c
diff --git a/util.c b/util.c
index f7fdbfaa401399985412734514a69e62d496e811..abf567b0f0f3d382486bd884b2321a27005cfe1b 100644 (file)
--- a/util.c
+++ b/util.c
@@ -9,7 +9,6 @@
 #include <stdlib.h>
 #include <time.h>
 
-
 // controls the output of debugging messages, set to 1 to have no
 // messages
 int QUIET = 0;
@@ -51,30 +50,4 @@ void warn(char *format, ...)
   va_start (args, format);
   vfprintf(stderr, format, args);
   va_end (args);
-}
-
-/*
-  Evaluates Rule C & D of Dijkstra-Scholten. Caller must already hold state_mutex!
-*/
-static void try_resolve_tree(int my_id)
-{
-    if (state == PASSIVE_STATE && deficit == 0)
-    {
-        if (is_initiator) {
-            // Root is passive and deficit is 0 -> Global Termination!
-            return; 
-        }
-
-        if (parent != -1)
-        {
-            control_message_t sig = {0};
-            // Send acknowledgment signal up the tree to our parent
-            MPI_Send(&sig, sizeof(control_message_t), MPI_BYTE, parent, 
-                     CONTROL_SIGNAL, MPI_COMM_WORLD);
-            
-            trace("%d: [CONTROL] Sent tree-signal to parent %d\n", my_id, parent);
-            parent = -1; // Detach from tree
-            
-        }
-    }
 }
\ No newline at end of file