Today Atomic::cmpxchg uses a seemingly suboptimal macro to let x86 platforms override the default emulated jbyte Atomic::cmpxchg with a native instruction. This is a hack and should be cleaned up.
Instead of a macro, inheritance and a template provides a general solution for letting specific platforms optionally provide their own implementations of such generalized atomic instructions in the Atomic class.
Instead of a macro, inheritance and a template provides a general solution for letting specific platforms optionally provide their own implementations of such generalized atomic instructions in the Atomic class.