aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/runtime/atomic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/vm/runtime/atomic.cpp')
-rw-r--r--src/share/vm/runtime/atomic.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/share/vm/runtime/atomic.cpp b/src/share/vm/runtime/atomic.cpp
index 299d2b00a..847cf0861 100644
--- a/src/share/vm/runtime/atomic.cpp
+++ b/src/share/vm/runtime/atomic.cpp
@@ -44,3 +44,15 @@ jbyte Atomic::cmpxchg(jbyte exchange_value, volatile jbyte* dest, jbyte compare_
}
return cur_as_bytes[offset];
}
+
+unsigned Atomic::xchg(unsigned int exchange_value, volatile unsigned int* dest) {
+ assert(sizeof(unsigned int) == sizeof(jint), "more work to do");
+ return (unsigned int)Atomic::xchg((jint)exchange_value, (volatile jint*)dest);
+}
+
+unsigned Atomic::cmpxchg(unsigned int exchange_value,
+ volatile unsigned int* dest, unsigned int compare_value) {
+ assert(sizeof(unsigned int) == sizeof(jint), "more work to do");
+ return (unsigned int)Atomic::cmpxchg((jint)exchange_value, (volatile jint*)dest,
+ (jint)compare_value);
+}