Skip to content

Commit bdb50ca

Browse files
weixluHao Tang
authored andcommitted
8270347: ZGC: Adopt release-acquire ordering for forwarding table access
Co-authored-by: Hao Tang <albert.th@alibaba-inc.com> Reviewed-by: eosterlund, pliden
1 parent b217a6c commit bdb50ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hotspot/share/gc/z/zForwarding.inline.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ inline uintptr_t ZForwarding::insert(uintptr_t from_index, uintptr_t to_offset,
137137
const ZForwardingEntry old_entry; // Empty
138138

139139
for (;;) {
140-
const ZForwardingEntry prev_entry = Atomic::cmpxchg(entries() + *cursor, old_entry, new_entry);
140+
const ZForwardingEntry prev_entry = Atomic::cmpxchg(entries() + *cursor, old_entry, new_entry, memory_order_release);
141141
if (!prev_entry.populated()) {
142142
// Success
143143
return to_offset;

0 commit comments

Comments
 (0)