mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8194406: Use Atomic::replace_if_null
Reviewed-by: coleenp, dholmes
This commit is contained in:
parent
c7e601e911
commit
9e5bf18428
9 changed files with 17 additions and 18 deletions
|
@ -1625,7 +1625,7 @@ bool nmethod::test_set_oops_do_mark() {
|
|||
assert(nmethod::oops_do_marking_is_active(), "oops_do_marking_prologue must be called");
|
||||
if (_oops_do_mark_link == NULL) {
|
||||
// Claim this nmethod for this thread to mark.
|
||||
if (Atomic::cmpxchg(NMETHOD_SENTINEL, &_oops_do_mark_link, (nmethod*)NULL) == NULL) {
|
||||
if (Atomic::replace_if_null(NMETHOD_SENTINEL, &_oops_do_mark_link)) {
|
||||
// Atomically append this nmethod (now claimed) to the head of the list:
|
||||
nmethod* observed_mark_nmethods = _oops_do_mark_nmethods;
|
||||
for (;;) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue