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.
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.