blob: 284d98fd8de5e8e632b38f54ef7efbdc6ea54d53 [file] [log] [blame]
//===---------- SynchronizedCounter.java - Atomic counter -----------------===//
//
// The VMKit project
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
package org.j3.mmtk;
/**
* A counter that supports atomic increment and reset.
*/
public final class SynchronizedCounter extends org.mmtk.vm.SynchronizedCounter {
private int count = 0;
public native int reset();
public native int increment();
public int peek() {
return count;
}
}