return null;
}
- public void execute(Object myWork) {
- Segment work = (Segment)myWork;
-
- int numApple = work.x;
-
- ownTotal += numApple;
-
+ public void execute() {
+ Segment s;
+ atomic {
+ s = (Segment)myWork;
+ ownTotal += s.x;
+ }
}
public void done(Object work) {
- atomic {
doneList.push(work);
- }
}
public static void main(String[] args) {
}
int[] mid = new int[NUM_THREADS];
-// mid[0] = (128<<24)|(195<<16)|(136<<8)|162; //dc1
-// mid[1] = (128<<24)|(195<<16)|(136<<8)|163; //dc2
- mid[0] = (128<<24)|(195<<16)|(136<<8)|164; //dc3
+ mid[0] = (128<<24)|(195<<16)|(180<<8)|21; //dw-2
+ mid[1] = (128<<24)|(195<<16)|(180<<8)|24; //dw-5
+/* mid[0] = (128<<24)|(195<<16)|(136<<8)|164; //dc3
mid[1] = (128<<24)|(195<<16)|(136<<8)|165; //dc4
mid[2] = (128<<24)|(195<<16)|(136<<8)|166; //dc5
mid[3] = (128<<24)|(195<<16)|(136<<8)|167; //dc6
mid[4] = (128<<24)|(195<<16)|(136<<8)|168; //dc7
- mid[5] = (128<<24)|(195<<16)|(136<<8)|169; //dc8
+ mid[5] = (128<<24)|(195<<16)|(136<<8)|169; //dc8*/
atomic {
drinkers = global new Drinker[NUM_THREADS];
MAINCLASS2=Simple
SRC1=${MAINCLASS1}.java
SRC2=${MAINCLASS2}.java
-FLAGS1= -dsm -nooptimize -recovery -debug -mainclass ${MAINCLASS1}
-FLAGS2= -dsm -nooptimize -recovery -debug -mainclass ${MAINCLASS2}
+FLAGS1= -dsm -nooptimize -debug -recovery -mainclass ${MAINCLASS1}
+FLAGS2= -dsm -nooptimize -debug -recovery -mainclass ${MAINCLASS2}
default:
../../../../buildscript ${FLAGS1} -o ${MAINCLASS1} ${SRC1}
../../../../buildscript ${FLAGS2} -o ${MAINCLASS2} ${SRC2}