示例#1
0
 public Object() {
   hashCode = (((VM.getIsland() << 3) | VM.getCore()) << 16) | VM.getNextHashcode();
 }
示例#2
0
  public void run() {

    long start, end;

    // Start timer
    start = System.currentTimeMillis();

    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);
    myint.set(50);

    end = System.currentTimeMillis();

    System.out.println(
        "W contention on atomic "
            + (end - start)
            + " ms BID: "
            + VM.getIsland()
            + " CID: "
            + VM.getCore());
  }