JDK-6824520 : Atomic - remove duplication and improve unsigned type support
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Other
  • OS: generic
  • CPU: generic
  • Submitted: 2009-03-31
  • Updated: 2017-02-08
  • Resolved: 2017-02-08
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 10
10Resolved
Related Reports
Relates :  
Description
The Atomic class is a platform-independent interface to platform-specific methods for instructions such as cas, xchg, cmpxchg, etc.  The implementation contains unnecessary code duplication and the support for unsigned types is incomplete.  As an example of the code duplication, the method
  cmpxchg_ptr(void *new_val, volatile void *dest, void *old_val)
has a body defined in each of the platform-specific files when a single platform-independent version would be sufficient.

Comments
The duplication has been addressed. There is a specific RFE for more size_t support for cmpxchg. This RFE is too open-ended with missing detail, so I will close it out and we will address specific issues case by case.
08-02-2017

I think the duplication aspect has already been handled by JDK-7143664
03-11-2016

EVALUATION Remove the many platform-specific methods in favor of a single platform-independent method and add unsigned variants for the different size quantities.
31-03-2009