This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

question about queue.h


hi list,
i have a question about sys/queue.h (not a bug report).

sys/queue.h provides macros for links lists. the code structure looks like this:

#define LIST_ENTRY(type)
struct {                                                                \
        struct type *le_next;   /* next element */                      \
        struct type **le_prev;  /* address of previous next element */  \
}

is there any (technical) reason why (struct type **) ?

the author (?) provides also a second type that look like this:
#define CIRCLEQ_ENTRY(type)                                             \
struct {                                                                \
        struct type *cqe_next;          /* next element */              \
        struct type *cqe_prev;          /* previous element */          \
}

is the first an ancient typo that could be fixed ?

i googled a bit and found no good answer.

re,
 wh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]