【Linux操作系统实现】内核中的数据结构
1、 struct list_head 结构
用法:双链表表头,链表元素是list_head *,通过这个链表可以把任何包含struct list_head成员的结构体变量添加到链表中,并且通过container_of宏可以实现对含有struct list_head成员的结构体变量的访问。
实现:
struct list_head {
struct list_head *next, *prev;
}
参考博文:【精选】Linux- struct list_head简介_一只青木呀的博客-CSDN博客
浙公网安备 33010602011771号