SGCluster.java
class SGCluster$B1C2 {
// STATE SPACE VARIABLES:
private static int Ba1_1 , Ba1_2 ;
// LOCAL VARIABLES:
private static Object clusterCounterLock = new Object();
/**======================================================**
**
** Generated lock and methods for atomic: B1$enter
**
**======================================================**/
public static void B1$enter() {
synchronized (clusterCounterLock) {
Ba1_2 -- ; ;
}
synchronized (condition$C2$exit) {
condition$C2$exit.notify();
}
}
/**======================================================**
**
** Generated lock and methods for await: B1$exit
**
**======================================================**/
private static Object condition$B1$exit = new Object();
public static void B1$exit(){
synchronized (condition$B1$exit) {
while ( !check$B1$exit())
try {
condition$B1$exit.wait();
} catch (InterruptedException e){}
}
}
private static boolean check$B1$exit() {
synchronized (clusterCounterLock) {
if (Ba1_1 <= -1 ) {
Ba1_1 ++ ; ;
return true;
} else
return false;
}
}
/**======================================================**
**
** Generated lock and methods for atomic: C2$enter
**
**======================================================**/
public static void C2$enter() {
synchronized (clusterCounterLock) {
Ba1_1 -- ; ;
}
synchronized (condition$B1$exit) {
condition$B1$exit.notify();
}
}
/**======================================================**
**
** Generated lock and methods for await: C2$exit
**
**======================================================**/
private static Object condition$C2$exit = new Object();
public static void C2$exit(){
synchronized (condition$C2$exit) {
while ( !check$C2$exit())
try {
condition$C2$exit.wait();
} catch (InterruptedException e){}
}
}
private static boolean check$C2$exit() {
synchronized (clusterCounterLock) {
if (Ba1_2 <= -1 ) {
Ba1_2 ++ ; ;
return true;
} else
return false;
}
}
}
syntax highlighted by Code2HTML, v. 0.9

