算法与数据结构
云卷花开
这个作者很懒,什么都没留下…
展开
-
linux内核container_of宏使用详解
linux内核代码有很多巧妙地设计,其设计思想值得我们深入学习分析.今天来分析一下linux内核中大量使用的一个宏定义container_of(ptr, type, member)先上功能定义:已知结构体type的成员变量member的地址是ptr,推导出结构体变量的首地址./** * container_of - cast a member of a structure out to the containing structure * @ptr: the pointer to the原创 2022-01-23 12:58:49 · 1510 阅读 · 0 评论 -
C语言单链表实现增删改查
单链表增删改查,附实现思路及完整代码.原创 2022-01-06 22:30:00 · 3412 阅读 · 0 评论