equal
deleted
inserted
replaced
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 #include "precompiled.hpp" |
24 #include "precompiled.hpp" |
25 #include "gc/z/zResurrection.hpp" |
25 #include "gc/z/zResurrection.hpp" |
26 #include "runtime/orderAccess.hpp" |
26 #include "runtime/atomic.hpp" |
27 #include "runtime/safepoint.hpp" |
27 #include "runtime/safepoint.hpp" |
28 #include "utilities/debug.hpp" |
28 #include "utilities/debug.hpp" |
29 |
29 |
30 volatile bool ZResurrection::_blocked = false; |
30 volatile bool ZResurrection::_blocked = false; |
31 |
31 |
33 assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint"); |
33 assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint"); |
34 _blocked = true; |
34 _blocked = true; |
35 } |
35 } |
36 |
36 |
37 void ZResurrection::unblock() { |
37 void ZResurrection::unblock() { |
38 // We use a storestore barrier to make sure all healed |
38 // No need for anything stronger than a relaxed store here. |
39 // oops are visible before we unblock resurrection. |
39 // The preceeding handshake makes sure that all non-strong |
40 OrderAccess::storestore(); |
40 // oops have already been healed at this point. |
41 _blocked = false; |
41 Atomic::store(&_blocked, false); |
42 } |
42 } |