Linux 内核的 list.h 中的 `pos` 是什么意思
What does `pos` mean in the Linux kernel's list.h
Linux kernel's list.h 提供了一些宏来迭代它自己的链表实现。例如:
/**
* list_for_each - iterate over a list
* @pos: the &struct list_head to use as a loop cursor.
* @head: the head for your list.
*/
#define list_for_each(pos, head) \
for (pos = (head)->next; pos != (head); pos = pos->next)
试图缩写的 pos
参数的名称是什么? (pos
代表什么意思?)
表示"position",如当前在列表中的位置
缩写"position",表示当前光标位置
Linux kernel's list.h 提供了一些宏来迭代它自己的链表实现。例如:
/**
* list_for_each - iterate over a list
* @pos: the &struct list_head to use as a loop cursor.
* @head: the head for your list.
*/
#define list_for_each(pos, head) \
for (pos = (head)->next; pos != (head); pos = pos->next)
试图缩写的 pos
参数的名称是什么? (pos
代表什么意思?)
表示"position",如当前在列表中的位置
缩写"position",表示当前光标位置