On 2026-05-03 21:21, Gregory Nutt wrote:
If an implementation requires multiple accesses to read/write uint64, then the accesses would be non-atomic. At a bare minimum, the locked section would be required (which would not prevent concurrent accesses from interrupt handlers).
Interesting point. For AVR, I am already aware of this - some time ago I even posted a patch that reduced data types of indices to UART circular buffer for 8 bit chips. I have to wonder how much code is in the codebase that assumes that access to time_t is always atomic (because the architecture is 32bit and so is time_t.) This may be important because if I understand it correctly, 32bit CPUs will then suffer from the same problem with split reads/writes of 64bit time_t as 8bit CPUs do with 32/16bit values.
I support the POSIX first prioritization. I removed a lot of support needed by some of these architectures in the past for similar reasons. That broke certain compilers and a lot of implementations (which are still broken). We should probably do the same, but with full awareness of functionality well will use or things that are very broken.
Could you post some examples? I am aware of cirbuf_t which has the same problem as the UART circular buffer had. But other than that, I don't remember noticing anything that would scream "broken" for 8 bits.
I have suggested removing support for the 8 bit architectures and for compilers like the ZDS and SDCC compilers. Carrying architectures with this level of breakage is misleading.
Hm, sounds like I shouldn't put much more effort in NuttX (at least with AVR), developing for an architecture that may be heading to a chopping block doesn't seem very productive in a long run.
