Skip to content

Commit 1867eff

Browse files
committed
8315131: Clarify VarHandle set/get access on 32-bit platforms
Reviewed-by: rriggs, iris Backport-of: ea6674fec8702eea481afa7ca7e522cbacd53841
1 parent e8f2cd8 commit 1867eff

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/java.base/share/classes/java/lang/foreign/MemoryLayout.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,10 @@
276276
* if {@code A >= S}. An aligned var handle is guaranteed to support the following
277277
* access modes:
278278
* <ul>
279-
* <li>read write access modes for all {@code T}. On 32-bit platforms, access modes
280-
* {@code get} and {@code set} for {@code long}, {@code double} and {@code MemorySegment}
281-
* are supported but might lead to word tearing, as described in Section {@jls 17.7}.
282-
* of <cite>The Java Language Specification</cite>.
279+
* <li>read write access modes for all {@code T}. Access modes {@code get} and
280+
* {@code set} for {@code long}, {@code double} and {@code MemorySegment}
281+
* are supported but have no atomicity guarantee, as described in Section
282+
* {@jls 17.7} of <cite>The Java Language Specification</cite>.
283283
* <li>atomic update access modes for {@code int}, {@code long},
284284
* {@code float}, {@code double} and {@link MemorySegment}.
285285
* (Future major platform releases of the JDK may support additional

src/java.base/share/classes/java/lang/invoke/MethodHandles.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4305,9 +4305,10 @@ public static VarHandle byteArrayViewVarHandle(Class<?> viewArrayClass,
43054305
* If access is aligned then following access modes are supported and are
43064306
* guaranteed to support atomic access:
43074307
* <ul>
4308-
* <li>read write access modes for all {@code T}, with the exception of
4309-
* access modes {@code get} and {@code set} for {@code long} and
4310-
* {@code double} on 32-bit platforms.
4308+
* <li>read write access modes for all {@code T}. Access modes {@code get}
4309+
* and {@code set} for {@code long} and {@code double} are supported but
4310+
* have no atomicity guarantee, as described in Section {@jls 17.7} of
4311+
* <cite>The Java Language Specification</cite>.
43114312
* <li>atomic update access modes for {@code int}, {@code long},
43124313
* {@code float} or {@code double}.
43134314
* (Future major platform releases of the JDK may support additional

0 commit comments

Comments
 (0)