mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8254162: Implementation of Foreign-Memory Access API (Third Incubator)
Reviewed-by: erikj, psandoz, alanb
This commit is contained in:
parent
c6ab0fdb15
commit
3e70aac5cc
82 changed files with 6038 additions and 2837 deletions
|
@ -33,8 +33,7 @@ class XXX {
|
|||
|
||||
private $type$ get$Type$(long a) {
|
||||
try {
|
||||
checkSegment();
|
||||
$memtype$ x = UNSAFE.get$Memtype$Unaligned(null, a, bigEndian);
|
||||
$memtype$ x = SCOPED_MEMORY_ACCESS.get$Memtype$Unaligned(scope(), null, a, bigEndian);
|
||||
return $fromBits$(x);
|
||||
} finally {
|
||||
Reference.reachabilityFence(this);
|
||||
|
@ -62,9 +61,8 @@ class XXX {
|
|||
private ByteBuffer put$Type$(long a, $type$ x) {
|
||||
#if[rw]
|
||||
try {
|
||||
checkSegment();
|
||||
$memtype$ y = $toBits$(x);
|
||||
UNSAFE.put$Memtype$Unaligned(null, a, y, bigEndian);
|
||||
SCOPED_MEMORY_ACCESS.put$Memtype$Unaligned(scope(), null, a, y, bigEndian);
|
||||
} finally {
|
||||
Reference.reachabilityFence(this);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue