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

