<sys/queue.h> bikeshed proposal
Julian Elischer
julian at elischer.org
Thu Mar 15 17:07:45 UTC 2007
Yar Tikhiy wrote:
> On Tue, Mar 13, 2007 at 09:38:05AM +0000, Poul-Henning Kamp wrote:
>> In message <39968.1173776514 at critter.freebsd.dk>, Poul-Henning Kamp writes:
>>> It has always bothered me that some of the TAILQ macros need to
>>> know the struct name of the header type.
>
> Yeah, <sys/queue.h> can present a challenge in understanding an
> implementation of basic data structures and related algos. :-)
> You thought that tqe_prev points to the whole entry structure when
> making the patch, didn't you?
>
> Personally, I cannot explain to myself why in the double-linked
> structs the prev member points to the next member in the previous
> list element and not to the previous list element itself. Could
> anybody with CS education explain merits of the current approach?
> I can only see that now we have to go to the element before the
> previous one for a pointer to the latter. I'm not going to dispute
> the current way of things, just curious.
kirk can tell you that I believe..
>
More information about the freebsd-arch
mailing list