SGCluster.java
class SGCluster$C4P3 {
// STATE SPACE VARIABLES:
private static int AG2_1_1 ;
// LOCAL VARIABLES:
private static int LA2_1 ;
private static Object clusterCounterLock = new Object();
/**======================================================**
**
** Generated lock and methods for atomic: C4$enter
**
**======================================================**/
public static void C4$enter() {
synchronized (clusterCounterLock) {
}
}
/**======================================================**
**
** 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 (AG2_1_1 <= -1 ) {
AG2_1_1 ++ ;
return true;
} else
return false;
}
}
/**======================================================**
**
** Generated lock and methods for atomic: P3$enter
**
**======================================================**/
public static void P3$enter() {
synchronized (clusterCounterLock) {
LA2_1 += 1 ; if ( LA2_1 == 10 ) { AG2_1_1 -= 1 ; LA2_1 = 0 ; } ;
}
synchronized (condition$C4$exit) {
condition$C4$exit.notifyAll();
}
}
/**======================================================**
**
** Generated lock and methods for atomic: P3$exit
**
**======================================================**/
public static void P3$exit() {
synchronized (clusterCounterLock) {
}
}
}
syntax highlighted by Code2HTML, v. 0.9

