SGCluster.java

class SGCluster$C3P2 {
// STATE SPACE VARIABLES: 

private static int AG1_1_1 ;
// LOCAL VARIABLES: 
private static int LA1_1 ;

private static Object clusterCounterLock = new Object();

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

public static void C3$enter() {

   synchronized (clusterCounterLock) {
      LA1_1 += 1 ; if ( LA1_1 == 1 ) { AG1_1_1 -= 10 ; LA1_1 = 0 ; } ; 
   }

   synchronized (condition$P2$exit) {
      condition$P2$exit.notifyAll(); 
   }


}

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

public static void C3$exit() {

   synchronized (clusterCounterLock) {
      
   }

}

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

public static void P2$enter() {
   synchronized (clusterCounterLock) {

      
   }

}


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

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

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

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

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

   }

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

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

         AG1_1_1 ++ ; 
         return true;
      } else

         return false;
   }
}
}


syntax highlighted by Code2HTML, v. 0.9