Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8290324

Move atomic operations outside of os_xxx.hpp

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 20
    • 20
    • hotspot
    • b08

    Description

      The os_xxx.hpp files inject extra methods/fields that are specific to atomic operations into the "os" class.

      For example: os::atomic_copy64

      https://github.com/openjdk/jdk/blob/3ad39505605f8eab74adec9c68f211dd44796759/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp#L49-L88

      or os::atomic_cmpxchg_long_func

      https://github.com/openjdk/jdk/blob/3ad39505605f8eab74adec9c68f211dd44796759/src/hotspot/os_cpu/linux_arm/os_linux_arm.hpp#L41-L69

      These injections are not necessary, as the injected methods/fields are used only by a specific os/cpu combination. Therefore, they should not be inside the "os" class, which should contain only APIs that are used across platforms.

      Attachments

        Issue Links

          Activity

            People

              iklam Ioi Lam
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: