diff options
author | hsu <hsu@FreeBSD.org> | 1996-03-11 02:14:38 +0000 |
---|---|---|
committer | hsu <hsu@FreeBSD.org> | 1996-03-11 02:14:38 +0000 |
commit | c74a394f0fdbc1437617bb61030299a259d50f7d (patch) | |
tree | 49e893045fae2c1f197e81a3dd78dd6e6b20253b /sys/sys/queue.h | |
parent | a5622ab0305b422ead7bed63d4c298a515b3306f (diff) | |
download | FreeBSD-src-c74a394f0fdbc1437617bb61030299a259d50f7d.zip FreeBSD-src-c74a394f0fdbc1437617bb61030299a259d50f7d.tar.gz |
Merge in Lite2: fix comment
optimize TAILQ_INSERT_HEAD
Reviewed by: davidg & bde
Diffstat (limited to 'sys/sys/queue.h')
-rw-r--r-- | sys/sys/queue.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/sys/queue.h b/sys/sys/queue.h index a56ae0d..4e75549 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; \ |