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 <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
ouyangxiangzhen
2025-04-22 16:59:10 +08:00
committed by GUIDINGLI
parent 35886c18ab
commit 57a12556d2
+1 -1
View File
@@ -321,8 +321,8 @@
struct list_node
{
FAR struct list_node *prev;
FAR struct list_node *next;
FAR struct list_node *prev;
};
/****************************************************************************