0

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?)

ybakos
  • 8,152
  • 7
  • 46
  • 74

2 Answers2

3

It means "position", as in the current position in the list.

Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328
2

It is abbreviating "position", it is showing the current cursor position.

tversteeg
  • 4,717
  • 10
  • 42
  • 77