mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8234562: Move OrderAccess::release_store*/load_acquire to Atomic
Reviewed-by: rehn, dholmes
This commit is contained in:
parent
e06c17ce33
commit
e527ce4b57
97 changed files with 554 additions and 570 deletions
|
@ -1269,7 +1269,7 @@ NonJavaThread::List NonJavaThread::_the_list;
|
|||
|
||||
NonJavaThread::Iterator::Iterator() :
|
||||
_protect_enter(_the_list._protect.enter()),
|
||||
_current(OrderAccess::load_acquire(&_the_list._head))
|
||||
_current(Atomic::load_acquire(&_the_list._head))
|
||||
{}
|
||||
|
||||
NonJavaThread::Iterator::~Iterator() {
|
||||
|
@ -1278,7 +1278,7 @@ NonJavaThread::Iterator::~Iterator() {
|
|||
|
||||
void NonJavaThread::Iterator::step() {
|
||||
assert(!end(), "precondition");
|
||||
_current = OrderAccess::load_acquire(&_current->_next);
|
||||
_current = Atomic::load_acquire(&_current->_next);
|
||||
}
|
||||
|
||||
NonJavaThread::NonJavaThread() : Thread(), _next(NULL) {
|
||||
|
@ -1291,8 +1291,8 @@ void NonJavaThread::add_to_the_list() {
|
|||
MutexLocker ml(NonJavaThreadsList_lock, Mutex::_no_safepoint_check_flag);
|
||||
// Initialize BarrierSet-related data before adding to list.
|
||||
BarrierSet::barrier_set()->on_thread_attach(this);
|
||||
OrderAccess::release_store(&_next, _the_list._head);
|
||||
OrderAccess::release_store(&_the_list._head, this);
|
||||
Atomic::release_store(&_next, _the_list._head);
|
||||
Atomic::release_store(&_the_list._head, this);
|
||||
}
|
||||
|
||||
void NonJavaThread::remove_from_the_list() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue