src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp
equal
deleted
inserted
replaced
60 inline void set_bits_cas_form(jbyte bits, jbyte* const dest) { |
60 inline void set_bits_cas_form(jbyte bits, jbyte* const dest) { |
61 assert(dest != NULL, "invariant"); |
61 assert(dest != NULL, "invariant"); |
62 do { |
62 do { |
63 const jbyte current = *dest; |
63 const jbyte current = *dest; |
64 const jbyte new_value = op(current, bits); |
64 const jbyte new_value = op(current, bits); |
65 if (Atomic::cmpxchg(new_value, dest, current) == current) { |
65 if (Atomic::cmpxchg(dest, current, new_value) == current) { |
66 return; |
66 return; |
67 } |
67 } |
68 } while (true); |
68 } while (true); |
69 } |
69 } |
70 |
70 |