get rid of the stream parsing that occurs in the Layer III decoder. BitStream.readFra...
[IRC.git] / Robust / src / Tests / Atomic2.java
1 public class Atomic2 extends Thread {
2     public Atomic2() {
3     }
4     int count;
5     public static void main(String[] st) {
6         //int mid = (128<<24)|(200<<16)|(9<<8)|26;
7         int mid = (128<<24)|(195<<16)|(175<<8)|70;
8         Atomic2 t =null;
9         atomic {
10             t= global new Atomic2();
11             t.count=0;
12         }
13         System.printString("Starting\n");
14         t.start(mid);
15         System.printString("Finished\n");
16         //this is ugly...
17         while(true) {
18             atomic {
19                 t.count++;
20             }
21         }
22     }
23
24     public int run() {
25         while(true) {
26             int tmpcount;
27             atomic {
28                 tmpcount=count;
29             }
30             System.printString("Current count=");
31             System.printInt(tmpcount);
32             System.printString("\n");
33         }
34     }
35 }
36