having new variable 'inter' in-between "reorder/antialias" and "hybrid" in order...
[IRC.git] / Robust / src / Tests / Atomic3.java
1 public class Atomic3 extends Thread {
2         public Atomic3() {
3         }
4         Tree root;
5         Integer count;
6         public static void main(String[] st) {
7                 int mid = (128<<24)|(195<<16)|(175<<8)|70;
8                 int b;
9                 Atomic3 at3 = null;
10                 Integer y,z;
11                 atomic {
12                         at3 = global new Atomic3();
13                         z = global new Integer(300);
14                         at3.root = global new Tree();
15                         at3.root.insert(z);
16                         b = at3.root.value.intValue();
17                 }
18                 System.printString("b is ");
19                 System.printInt(b);
20                 System.printString("\n");
21                 atomic{
22                         at3.root.item = 2445;
23                         y = global new Integer(400);
24                         at3.root.value = y;
25                         b = at3.root.value.intValue();
26                 }
27                 System.printString("b is ");
28                 System.printInt(b);
29                 System.printString("\n");
30                 System.printString("Starting\n");
31                 at3.start(mid);
32                 System.printString("Finished\n");
33                 while(true) {
34                         ;
35                 }
36         }
37
38         public int run() {
39                 int a;
40                 atomic {
41                         a = root.value.intValue();
42                 }
43                 System.printString("a is ");
44                 System.printInt(a);
45                 System.printString("\n");
46         }
47 }
48
49 public class Tree {
50         public Integer value;
51         public int item;
52         public Tree left;
53         public Tree right;
54
55         public Tree() {
56         }
57
58         public Tree(Integer item) {
59                 value = item;
60                 left = null;
61                 right = null;
62         }
63
64         public Tree(Integer item , Tree l, Tree r) {
65                 value = item;
66                 left =l;
67                 right = r;
68         }
69
70         public Tree insert(Integer a) {
71                 value = a;
72                 left = null;
73                 right = null;
74                 return this;
75         }
76 }