summaryrefslogtreecommitdiffstats
path: root/sys/sys/queue.h
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1996-01-29 03:20:44 +0000
committergibbs <gibbs@FreeBSD.org>1996-01-29 03:20:44 +0000
commit2d24ffe647290dcbf969b95b9a51daa87c5301fd (patch)
tree81767cd7e4caad81656c422e2f443d79831bf0e0 /sys/sys/queue.h
parentcab528dc9e181055b45685c22f46be08c3c594c5 (diff)
downloadFreeBSD-src-2d24ffe647290dcbf969b95b9a51daa87c5301fd.zip
FreeBSD-src-2d24ffe647290dcbf969b95b9a51daa87c5301fd.tar.gz
Add LIST_INSERT_BEFORE and TAILQ_INSERT_BEFORE. These are used by the
new eisaconf code.
Diffstat (limited to 'sys/sys/queue.h')
-rw-r--r--sys/sys/queue.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/sys/queue.h b/sys/sys/queue.h
index 0501551..1fb7b95 100644
--- a/sys/sys/queue.h
+++ b/sys/sys/queue.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)queue.h 8.4 (Berkeley) 1/4/94
- * $Id: queue.h,v 1.3 1995/05/30 08:14:30 rgrimes Exp $
+ * $Id: queue.h,v 1.4 1995/12/03 13:45:34 bde Exp $
*/
#ifndef _SYS_QUEUE_H_
@@ -95,6 +95,13 @@ struct { \
(elm)->field.le_prev = &(listelm)->field.le_next; \
}
+#define LIST_INSERT_BEFORE(listelm, elm, field) { \
+ (elm)->field.le_prev = (listelm)->field.le_prev; \
+ (elm)->field.le_next = (listelm); \
+ *(listelm)->field.le_prev = (elm); \
+ (listelm)->field.le_prev = &(elm)->field.le_next; \
+}
+
#define LIST_INSERT_HEAD(head, elm, field) { \
if (((elm)->field.le_next = (head)->lh_first) != NULL) \
(head)->lh_first->field.le_prev = &(elm)->field.le_next;\
@@ -159,6 +166,13 @@ struct { \
(elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
}
+#define TAILQ_INSERT_BEFORE(head, listelm, elm, field) { \
+ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
+ (elm)->field.tqe_next = (listelm); \
+ *(listelm)->field.tqe_prev = (elm); \
+ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
+}
+
#define TAILQ_REMOVE(head, elm, field) { \
if (((elm)->field.tqe_next) != NULL) \
(elm)->field.tqe_next->field.tqe_prev = \
OpenPOWER on IntegriCloud