简体   繁体   中英

What does `pos` mean in the Linux kernel's list.h

The Linux kernel's list.h provides a number of macros for iterating over a its own linked list implementation. For example:

/**
 * 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)

What is the name of the pos parameter attempting to abbreviate? (What does pos stand for / mean?)

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM