Skip to main content
. Author manuscript; available in PMC: 2018 Jul 1.
Published in final edited form as: ACM Trans Model Comput Simul. 2017 Jul;27(2):7. doi: 10.1145/2987373

ALGORITHM 8.

Steps for communication thread sending external events

Input: External event e to be sent
if e is a non-control message then
  if e.color == WHITE then
    whiteCount++;
  else
    if e.type == RB-message then
      minRed=min(minRed, e.st);
    else
      minRed=min(minRed, e.rt);
    end
  end
else
  if e.type == GVT-CUT then
    for processing thread T in the same process do
      localGVT=min(localGVT, T.localMin, T.minSend);
    end
    Set count to the sum of whiteCount and cached count;
    whiteCount=0;
    localGVT=min(localGVT, minRed);
    Forward a GVT-CUT message (localGVT, count) to the next process;
  end
end