From 57a12556d2056703ff42ccea96629c8fcd037bb7 Mon Sep 17 00:00:00 2001 From: ouyangxiangzhen Date: Tue, 22 Apr 2025 16:59:10 +0800 Subject: [PATCH] list: Optimize the list structure. Since lists are traversed sequentially in most cases, moving the next pointer before the prev pointer can optimize memory access on some architectures. Signed-off-by: ouyangxiangzhen --- include/nuttx/list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nuttx/list.h b/include/nuttx/list.h index 2f26d8304d3..5a832c3cb3a 100644 --- a/include/nuttx/list.h +++ b/include/nuttx/list.h @@ -321,8 +321,8 @@ struct list_node { - FAR struct list_node *prev; FAR struct list_node *next; + FAR struct list_node *prev; }; /****************************************************************************