src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp	Thu Sep 11 23:19:43 2014
--- new/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp	Thu Sep 11 23:19:43 2014

*** 86,95 **** --- 86,103 ---- inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) { return (void*)xchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest); } + inline jbyte Atomic::cmpxchg (jbyte exchange_value, volatile jbyte* dest, jbyte compare_value) { + int mp = os::is_MP(); + __asm__ volatile (LOCK_IF_MP(%4) "cmpxchgb %1,(%3)" + : "=a" (exchange_value) + : "q" (exchange_value), "a" (compare_value), "r" (dest), "r" (mp) + : "cc", "memory"); + return exchange_value; + } inline jint Atomic::cmpxchg (jint exchange_value, volatile jint* dest, jint compare_value) { int mp = os::is_MP(); __asm__ volatile (LOCK_IF_MP(%4) "cmpxchgl %1,(%3)" : "=a" (exchange_value)

src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File