public static void exitCriticalSection() { TokenHandler.setHolderWhileInCS(false); if (!TokenHandler.childQueueIsEmpty()) { TokenHandler.setHasToken(false); TCPSend.grantToken( TokenHandler.childQueue.get(0), TreeGeneration.getPort(TokenHandler.childQueue.get(0))); TokenHandler.setParent(TokenHandler.childQueue.get(0)); TokenHandler.childQueue.remove(0); } }
public static void setParent(int parent) { TokenHandler.setParent(parent); }
public static void setInitiatorParent(int node) { TokenHandler.setParent(node); }