Mercurial > hg > Members > kono > jpf-core
changeset 30:9dc9df847545
Fixed a bug in AtomicLong native peer.
author | nastaran <nastaran.shafiei@gmail.com> |
---|---|
date | Wed, 25 May 2016 10:00:18 -0700 |
parents | 820b89dd6c97 |
children | 0069194b1048 |
files | src/peers/gov/nasa/jpf/vm/JPF_java_util_concurrent_atomic_AtomicLong.java |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/peers/gov/nasa/jpf/vm/JPF_java_util_concurrent_atomic_AtomicLong.java Fri Oct 16 15:55:08 2015 -0700 +++ b/src/peers/gov/nasa/jpf/vm/JPF_java_util_concurrent_atomic_AtomicLong.java Wed May 25 10:00:18 2016 -0700 @@ -58,14 +58,14 @@ @MJI public long getAndAdd__J__J (MJIEnv env, int objRef, long delta) { - long value = env.getIntField(objRef, "value"); + long value = env.getLongField(objRef, "value"); env.setLongField(objRef, "value", value + delta); return value; } @MJI public long incrementAndGet____J (MJIEnv env, int objRef) { - long value = env.getIntField(objRef, "value"); + long value = env.getLongField(objRef, "value"); value++; env.setLongField(objRef, "value", value); return value; @@ -73,7 +73,7 @@ @MJI public long decrementAndGet____J (MJIEnv env, int objRef) { - long value = env.getIntField(objRef, "value"); + long value = env.getLongField(objRef, "value"); value--; env.setLongField(objRef, "value", value); return value; @@ -81,7 +81,7 @@ @MJI public long addAndGet__J__J (MJIEnv env, int objRef, long delta) { - long value = env.getIntField(objRef, "value"); + long value = env.getLongField(objRef, "value"); value += delta; env.setLongField(objRef, "value", value); return value;