[an error occurred while processing this directive] >SGCluster.java
[an error occurred while processing this directive]

>SGCluster.java

class SGCluster$B3C4 {
// STATE SPACE VARIABLES: 

private static int B3_in , C4_out ;
// LOCAL VARIABLES: 

private static Object clusterCounterLock = new Object();

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

public static void B3$enter() {

   synchronized (clusterCounterLock) {
      B3_in ++ ; ;

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


}

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

public static void B3$exit() {

   synchronized (clusterCounterLock) {
      B3_out ++ ; ;

   }

}

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

public static void C4$enter() {

   synchronized (clusterCounterLock) {
      C4_in ++ ; ;

   }

}


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

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

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

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

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

   }

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

   synchronized (clusterCounterLock) {
      if (C4_out + 1 <= B3_in ) {

         C4_out ++ ; ;
         return true;
      } else

         return false;
   }
}
}


syntax highlighted by Code2HTML, v. 0.9