-
Jeffrey Lee authored
This implementation relies heavily on a new set of _kernel_atomic_* functions which implement all the atomic operations. Multiple different implementations of the functions are provided, to cater to all machines from ARMv2 to ARMv8. When targeting multiple CPU architectures, multiple variants will be compiled into the module, and the most appropriate variant will be selected at runtime when the client's stubs are filled in (using an extended version of the existing PickRoutineVariant system). Currently ROM clients will just use the variant for the oldest enabled architecture, to avoid the performance hit of runtime switching on every function call. The 40 new routines have been placed in a new library chunk (#6), so that old CLibs will properly reject any client that tries to use them, and to avoid ~500B of stubs bloat for programs that don't use them. Test & benchmark code is provided in the test/atomic folder.
ba404a22