I'm studying sys/queue.h
from FreeBSD and I have one question:
In sys/queue.h
, LIST_ENTRY
is defined as follows:
#define LIST_ENTRY(type) \
struct { \
struct type *le_next; /* next element */ \
struct type **le_prev; /* address of previous next element */ \
}
Why does it maintain the address of previous next element (struct type **le_prev
) rather than simply previous elment like struct type *le_prev
?