tailq.h (ffb836234b94e17739bac88bfd7f51f5ae49e3bc) tailq.h (ba00ec3d539f213abbda3a45ef8c539306cac098)
1/* $OpenBSD: queue.h,v 1.30 2005/10/25 06:37:47 otto Exp $ */
2/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */
3
4/*
5 * Copyright (c) 1991, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 22 unchanged lines hidden (view full) ---

31 *
32 * @(#)queue.h 8.5 (Berkeley) 8/20/94
33 */
34
35#ifndef SM_TAILQ_H_
36#define SM_TAILQ_H_
37
38/*
1/* $OpenBSD: queue.h,v 1.30 2005/10/25 06:37:47 otto Exp $ */
2/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */
3
4/*
5 * Copyright (c) 1991, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 22 unchanged lines hidden (view full) ---

31 *
32 * @(#)queue.h 8.5 (Berkeley) 8/20/94
33 */
34
35#ifndef SM_TAILQ_H_
36#define SM_TAILQ_H_
37
38/*
39 * $Id: tailq.h,v 1.2 2007/06/29 23:09:57 ca Exp $
39 * $Id: tailq.h,v 1.3 2012/01/21 00:12:14 ashish Exp $
40 *
41 * This file is a modified copy of queue.h from a BSD system:
42 * we only need tail queues here.
43 * We do not use queue.h directly because there is a conflict with
44 * some versions of that file on some OSs.
45 *
46 * A tail queue is headed by a pair of pointers, one to the head of the
47 * list and the other to the tail of the list. The elements are doubly

--- 16 unchanged lines hidden (view full) ---

64 { NULL, &(head).tqh_first }
65
66#define SM_TAILQ_ENTRY(type) \
67struct { \
68 struct type *tqe_next; /* next element */ \
69 struct type **tqe_prev; /* address of previous next element */ \
70}
71
40 *
41 * This file is a modified copy of queue.h from a BSD system:
42 * we only need tail queues here.
43 * We do not use queue.h directly because there is a conflict with
44 * some versions of that file on some OSs.
45 *
46 * A tail queue is headed by a pair of pointers, one to the head of the
47 * list and the other to the tail of the list. The elements are doubly

--- 16 unchanged lines hidden (view full) ---

64 { NULL, &(head).tqh_first }
65
66#define SM_TAILQ_ENTRY(type) \
67struct { \
68 struct type *tqe_next; /* next element */ \
69 struct type **tqe_prev; /* address of previous next element */ \
70}
71
72/*
73 * tail queue access methods
72/*
73 * tail queue access methods
74 */
75#define SM_TAILQ_FIRST(head) ((head)->tqh_first)
76#define SM_TAILQ_END(head) NULL
77#define SM_TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
78#define SM_TAILQ_LAST(head, headname) \
79 (*(((struct headname *)((head)->tqh_last))->tqh_last))
80/* XXX */
81#define SM_TAILQ_PREV(elm, headname, field) \

--- 76 unchanged lines hidden ---
74 */
75#define SM_TAILQ_FIRST(head) ((head)->tqh_first)
76#define SM_TAILQ_END(head) NULL
77#define SM_TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
78#define SM_TAILQ_LAST(head, headname) \
79 (*(((struct headname *)((head)->tqh_last))->tqh_last))
80/* XXX */
81#define SM_TAILQ_PREV(elm, headname, field) \

--- 76 unchanged lines hidden ---