xiaoxiang781216 commented on code in PR #10338:
URL: https://github.com/apache/nuttx/pull/10338#discussion_r1303486969
##########
include/nuttx/list.h:
##########
@@ -101,6 +101,17 @@
#define list_last_entry(list, type, member) \
list_entry((list)->prev, type, member)
+#define list_next_entry(list, type, member) \
Review Comment:
> I found the Linux variant, but failed to find FreeBSD variant. It would be
helpful if the link to FreeBSP file can be a part of a description.
FreeBSD just copy Linux header file directly:
https://github.com/freebsd/freebsd-src/blob/main/sys/compat/linuxkpi/common/include/linux/list.h#L204
>
> I also see that it includes `#include <nuttx/list.h>`, so I have two
questions/observations:
>
but, I can't find the inclusion, could you add the link?
> * Seems like `bcm43xxx` is not tested by CI
it enable in the following defconfig:
boards/arm/rp2040/raspberrypi-pico-w/configs/telnet/defconfig
boards/arm/stm32/emw3162/configs/wlan/defconfig
boards/arm/stm32/photon/configs/wlan/defconfig
boards/arm/stm32/photon/configs/wlan-perf/defconfig
> * How is this going to co-exist with `#define list_entry(ptr, type,
member) container_of(ptr, type, member)`? I would expect pre-processor errors
on code above.
>
> Currently I do not see a real use-case for `list_entry` and
`list_last_entry` based on above. I see that `list_first_entry` is used in
`void task_uninit_info(FAR struct task_group_s *group)` so wee can keep it, but
implement via `#define list_first_entry(list, type, member)
container_of((list)->next, type, member)`.
>
But it's natural to define list_entry/list_last_entry if list_first_entry is
defined. My question is that is this mean we can't use any macro or function
name from Linux?
> What are your thoughts here @yamt @patacongo @jerpelea @acassis ?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]