If I may, sitting on the side listening in, the correct answer is to use <stdint.h> where you would have used a uint32_t when you meant the value to be a 32-bit unsigned int.
stdint.h has been around since C99, and the use of things like unsigned long has been frowned upon by MISRA since the first release. ThreadX says that it is MISRA compliant, but that would be in word, not spirit. The guidelines (4.6) say not to use things like "unsigned long", but masking it with ULONG just delayed the problem, it didn’t avoid it.
Just a thought.
A On Jul 8, 2024, at 11:17, Bill Lamie via threadx-dev <threadx-dev@xxxxxxxxxxx> wrote:
Hi Adrian, The correct answer is to map ULONG to a 32-bit type in the RISC-V 64-bit port. The entire codebase assumes that ULONG is 32-bits. Changing the RISC-V 64-bit port isn’t as easy as changing types, but the Cortex-Axx 64-bit port should provide a good example. I hope this helps! Bill
--------------------- Andrei Chichak
Systems Developer CBF Systems Inc. 225 College Plaza 8215 112 Street NW EDMONTON, ALBERTA T6G 2C8 CANADA
Phone: 780-628-2072 Skype: andrei.chichak
|