Atomic op cleanup.
Replaced VM-local macros for barrier and CAS calls with the actual
versions provided by cutils.
ATOMIC_CMP_SWAP(addr,old,new) --> android_atomic_release_cas(old,new,addr)
MEM_BARRIER --> ANDROID_MEMBAR_FULL
Renamed android_quasiatomic* to dvmQuasiAtomic*.
Didn't change how anything works, just the names.
Change-Id: I8c68f28e1f7c9cb832183e0918d097dfe6a2cac8
diff --git a/vm/oo/Class.c b/vm/oo/Class.c
index db0ce7b..16cba12 100644
--- a/vm/oo/Class.c
+++ b/vm/oo/Class.c
@@ -1129,7 +1129,8 @@
do {
oldValue = gDvm.classSerialNumber;
newValue = oldValue + 1;
- } while (!ATOMIC_CMP_SWAP(&gDvm.classSerialNumber, oldValue, newValue));
+ } while (android_atomic_release_cas(oldValue, newValue,
+ &gDvm.classSerialNumber) != 0);
clazz->serialNumber = (u4) oldValue;
}