Date: 11 May 1998 22:22:31 -0000 From: Julian Assange <proff@iq.org> To: gibbs@FreeBSD.ORG Cc: mrg@eterna.com.au Subject: more queue.h brokenness Message-ID: <19980511222231.2857.qmail@iq.org>
next in thread | raw e-mail | index | archive | help
I notice someone (gibbs?) has updated sys/queue.h Unfortunately, because of the manner in which tqe_prev, and tqh_last are calculated, TAILQ_LAST and TAILQ_PREV need to be redefined like so: #define TAILQ_LAST(head) ((*((head)->tqh_last))? (*((head)->tqh_last)): TAILQ_FIRST(head)) #define TAILQ_PREV(head, elm, field) (((elm) == TAILQ_FIRST(head))?NULL: *((elm)->field.tqe_prev)) this is a hack-like solution; the alternative is to do away with the double indirection of tqh_last and tqe_prev, which would be annoying. the other queue.h types (where defined) also have this problem. TAILQ_PREV is only used in vm/vm_object.c, which, presumably, is why no-one has noticed the problem before (and why I've cc'd dyson). Cheers, Julian. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980511222231.2857.qmail>