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 |