JDK-8307806 : Rename Atomic::fetch_and_add and friends
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 21
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-05-10
  • Updated: 2023-05-17
  • Resolved: 2023-05-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21
21 b23Fixed
Related Reports
Relates :  
Description
JDK-8293117 introduced a suite of functions for atomic bit manipulation, with names "fetch_then_OP" and "OP_then_fetch" for the various OPs (and/or/xor).  This naming convention was chosen in part because "fetch_and_and" and similar names that would be consistent with the existing "add" variants seemed odd and confusing.

It would be better to have consistent naming, so we should make these name changes:
- "fetch_and_add" => "fetch_then_add"
- "add_and_fetch" => "add_then_fetch"

Note that there are currently no uses of "add_and_fetch" outside the implementation of Atomic.  Also note that we don't currently have subtraction variants of either.

Comments
Changeset: f09a0f5c Author: Kim Barrett <kbarrett@openjdk.org> Date: 2023-05-12 09:50:52 +0000 URL: https://git.openjdk.org/jdk/commit/f09a0f5ca787e139f240a33bb12491792b8e7003
12-05-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/13896 Date: 2023-05-10 08:38:49 +0000
10-05-2023