Skip to content

Commit

Permalink
Added log to coordinator
Browse files Browse the repository at this point in the history
  • Loading branch information
bergmanG committed Oct 9, 2021
1 parent 4a9d70d commit b8665c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TP3/coordinator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class remoteMutex
mutexQ.pop();
char *msg = encode(GRANT, get<0>(next));
send(get<1>(next), msg, sizeof(char) * F, 0);
cout << "GRANTED to " << get<0>(next) << endl;
if (granted_map.find(get<0>(next)) == granted_map.end())
{
granted_map[get<0>(next)] = 1;
Expand Down Expand Up @@ -56,6 +57,7 @@ class remoteMutex
}
void release()
{
cout << "RELEASED" << endl;
mtx.lock();
if (mutexQ.empty())
{
Expand Down

0 comments on commit b8665c5

Please sign in to comment.