The ARM M3 cores on the first Pi Pico do not have any atomic support. However, the ARM M33 does and the SDK has some C functions for atomic operations.
Is the C++ std::atomic API fully supported? On Apple ARM processors, the memory model of ARM must be carefully considered when making use of atomic operations. I presume it would be the same here. The ARM docs state "All store-release operations are multi-copy atomic". So it seems that atomic operations exist and use of such operations have the same caveats as on Apple M? cores regarding the much more relaxed memory model than on Intel CPUs.
Does anyone have a definite answer? Can we used C++ atomic operations when running interacting threads on two cores? Or from IRQ code?
Is the C++ std::atomic API fully supported? On Apple ARM processors, the memory model of ARM must be carefully considered when making use of atomic operations. I presume it would be the same here. The ARM docs state "All store-release operations are multi-copy atomic". So it seems that atomic operations exist and use of such operations have the same caveats as on Apple M? cores regarding the much more relaxed memory model than on Intel CPUs.
Does anyone have a definite answer? Can we used C++ atomic operations when running interacting threads on two cores? Or from IRQ code?
Statistics: Posted by FunMiles — Thu Dec 05, 2024 11:38 pm