pussuw commented on PR #14827: URL: https://github.com/apache/nuttx/pull/14827#issuecomment-2485815284
> * it seems a bit wasteful to mechanically replace short with long to me. especially where structure fields are arranged for a short. > > * why long? i suspect it's simpler to use a fixed sized type like int32_t given the current usage in our tree. Some architectures do not support subword atomics without involving libatomic (RISC-V is one). As a fallback, the current code we have invokes the nx_atomic functions which use spin locks internally to guarantee data integrity which causes a huge performance impact. I already see this after this patch https://github.com/apache/nuttx/pull/14465. If the data type size needs to be optimized, please make it possible for the user to force use of lock free versions (i.e. toolchain optimized versions) of the atomic_ procedures, as people who use them most likely want performance rather than size optimization. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org