目录
list_add_tail
是 Linux 内核中用于操作双向链表的一个函数,它将一个新节点添加到链表的尾部。这个函数是内核链表机制的一部分,定义在 <linux/list.h>
中。通过 list_add_tail
,你可以非常方便地构建和管理链表结构,而不需要手动调整指针。
函数原型
c
深色版本
static inline void list_add_tail(struct list_head *new, struct list_head *head)
- 参数:
new
: 指向要添加的新节点(struct list_head
类型)。head
: 指向链表头节点(struct list_head
类型)。