SGCluster.java

class SGCluster$B4C5 {
// STATE SPACE VARIABLES: 

private static int Re2 ;
// LOCAL VARIABLES: 

private static Object clusterCounterLock = new Object();

/**======================================================**
 **
 ** Generated lock and methods for atomic: B4$enter
 **
 **======================================================**/

public static void B4$enter() {

   synchronized (clusterCounterLock) {
      ;
   }

}


/**======================================================**
 **
 ** Generated lock and methods for await: B4$exit
 **
 **======================================================**/

private static Object condition$B4$exit = new Object();

public static void B4$exit(){
   synchronized (condition$B4$exit) {

      while ( !check$B4$exit())
         try {

            condition$B4$exit.wait();
         } catch (InterruptedException e){}

   }

}
private static boolean check$B4$exit() {

   synchronized (clusterCounterLock) {
      if (Re2 <= -1 ) {

         Re2 ++ ; ;
         return true;
      } else

         return false;
   }
}
/**======================================================**
 **
 ** Generated lock and methods for atomic: C5$enter
 **
 **======================================================**/

public static void C5$enter() {

   synchronized (clusterCounterLock) {
      Re2 -- ; ;

   }
   synchronized (condition$B4$exit) {
      condition$B4$exit.notify(); 
   }


}

/**======================================================**
 **
 ** Generated lock and methods for atomic: C5$exit
 **
 **======================================================**/

public static void C5$exit() {

   synchronized (clusterCounterLock) {
      ;
   }

}

}


syntax highlighted by Code2HTML, v. 0.9