From 83edfd3e32b3b3890175e18564165f699dd212ae Mon Sep 17 00:00:00 2001 From: Jeffrey Hsu Date: Mon, 11 Mar 1996 02:14:38 +0000 Subject: [PATCH] Merge in Lite2: fix comment optimize TAILQ_INSERT_HEAD Reviewed by: davidg & bde --- sys/sys/queue.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/sys/queue.h b/sys/sys/queue.h index a56ae0dd1db..4e75549c5de 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -30,8 +30,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)queue.h 8.4 (Berkeley) 1/4/94 - * $Id: queue.h,v 1.5 1996/01/29 03:20:41 gibbs Exp $ + * @(#)queue.h 8.5 (Berkeley) 8/20/94 + * $Id: queue.h,v 1.7 1996/02/24 10:58:08 hsu Exp $ */ #ifndef _SYS_QUEUE_H_ @@ -44,16 +44,16 @@ * A list is headed by a single forward pointer (or an array of forward * pointers for a hash table header). The elements are doubly linked * so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list after - * an existing element or at the head of the list. A list may only be - * traversed in the forward direction. + * traverse the list. New elements can be added to the list before + * or after an existing element or at the head of the list. A list + * may only be traversed in the forward direction. * * A tail queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list after - * an existing element, at the head of the list, or at the end of the - * list. A tail queue may only be traversed in the forward direction. + * traverse the list. New elements can be added to the list before or + * after an existing element, at the head of the list, or at the end of + * the list. A tail queue may only be traversed in the forward direction. * * A circle queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly @@ -141,7 +141,7 @@ struct { \ #define TAILQ_INSERT_HEAD(head, elm, field) { \ if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ - (elm)->field.tqe_next->field.tqe_prev = \ + (head)->tqh_first->field.tqe_prev = \ &(elm)->field.tqe_next; \ else \ (head)->tqh_last = &(elm)->field.tqe_next; \