【问题标题】:What does `pos` mean in the Linux kernel's list.hLinux内核的list.h中的`pos`是什么意思
【发布时间】:2016-09-01 13:54:36
【问题描述】:

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 代表/意思是什么?)

【问题讨论】:

    标签: c linux-kernel naming


    【解决方案1】:

    表示“位置”,如列表中的当前位置。

    【讨论】:

      【解决方案2】:

      是“位置”的缩写,表示当前光标位置。

      【讨论】:

      • 所以应该有一个答案锁定机制:P
      猜你喜欢
      • 1970-01-01
      • 2012-03-29
      • 2012-02-08
      • 1970-01-01
      • 1970-01-01
      • 2018-11-23
      • 2016-10-02
      • 2019-07-28
      相关资源
      最近更新 更多