6 public Barrier(int n) {
7 //System.printString("Initializing barrier for "+n+" threads.\n");
21 public static void enterBarrier(Barrier b) {
27 //System.printString("Entering barrier with ec="+b.entercount+" cl="+b.cleared+"\n");
31 if (tmp==b.numthreads) {
35 //System.printString("Exiting Barrier #1\n");
42 //System.printString("Waiting for last thread to enter\n");
47 int count = b.entercount;
50 //System.printString("Exiting Barrier #2\n");