Date: Thu, 12 Aug 1999 17:53:16 -0700 (PDT) From: John Polstra <jdp@polstra.com> To: doconnor@gsoft.com.au Cc: hackers@freebsd.org Subject: Re: STAILQ macros.. Message-ID: <199908130053.RAA31887@vashon.polstra.com> In-Reply-To: <XFMail.990810195034.doconnor@gsoft.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <XFMail.990810195034.doconnor@gsoft.com.au>, Daniel O'Connor <doconnor@gsoft.com.au> wrote: > I am looking at the STAILQ macros defined in <sys/queue.h> and I am > curious why it is necessary to declare stqh_last in the STAILQ_HEAD > as a pointer to pointer, rather than just a pointer? (like the head > pointer) When the list is empty, stqh_last points at stqh_first (which means it must be a pointer to pointer). That way, STAILQ_INSERT_TAIL doesn't have to treat an empty list as a special case. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "No matter how cynical I get, I just can't keep up." -- Nora Ephron 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?199908130053.RAA31887>