xiaoxiang781216 commented on issue #740: URL: https://github.com/apache/incubator-nuttx/issues/740#issuecomment-672911537
> > And if `FAR void *` will break things, there are many basic components will break too > > No, in general no. FAR void * is only a fatal decision if you intend to use it as a "container" to hold variables of other sizes. sizeof(uint32_t) is always 32 bits, but sizeof(void *) is variable on different MCUs from 16 to 64 bits. Yes, `sizeof(void *)` may become 16bits due to the small memory model on some arch, but can we assume that `sizeof(FAR void *)` is always equals to `sizeof(uintptr_t)` and `>= sizeof(uint32_t)`? Since for wdog_s case, most caller pass 'FAR void *', and all other pass pid_t(int16_t)/uint8_t, so it's safe. I decide to select `FAR void *' because all other similar callbacks use `FAR void *`. Is it reasonable? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
