mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +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
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "memory/allocation.hpp"
|
||||
#include "memory/metaspace.hpp"
|
||||
#include "runtime/orderAccess.hpp"
|
||||
#include "runtime/atomic.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
|
||||
// Array for metadata allocation
|
||||
|
@ -122,8 +122,8 @@ protected:
|
|||
T* adr_at(const int i) { assert(i >= 0 && i< _length, "oob: 0 <= %d < %d", i, _length); return &_data[i]; }
|
||||
int find(const T& x) { return index_of(x); }
|
||||
|
||||
T at_acquire(const int i) { return OrderAccess::load_acquire(adr_at(i)); }
|
||||
void release_at_put(int i, T x) { OrderAccess::release_store(adr_at(i), x); }
|
||||
T at_acquire(const int i) { return Atomic::load_acquire(adr_at(i)); }
|
||||
void release_at_put(int i, T x) { Atomic::release_store(adr_at(i), x); }
|
||||
|
||||
static int size(int length) {
|
||||
size_t bytes = align_up(byte_sizeof(length), BytesPerWord);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue