Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Add *_EMPTY() and SLIST_NEXT().
details: https://anonhg.NetBSD.org/src/rev/694035b0147c
branches: trunk
changeset: 486724:694035b0147c
user: mycroft <mycroft%NetBSD.org@localhost>
date: Sat May 27 22:17:54 2000 +0000
description:
Add *_EMPTY() and SLIST_NEXT().
diffstat:
sys/sys/queue.h | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diffs (60 lines):
diff -r f7697d27d062 -r 694035b0147c sys/sys/queue.h
--- a/sys/sys/queue.h Sat May 27 21:58:15 2000 +0000
+++ b/sys/sys/queue.h Sat May 27 22:17:54 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: queue.h,v 1.20 2000/03/15 02:03:11 fvdl Exp $ */
+/* $NetBSD: queue.h,v 1.21 2000/05/27 22:17:54 mycroft Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -130,8 +130,8 @@
/*
* List access methods.
*/
+#define LIST_EMPTY(head) ((head)->lh_first == NULL)
#define LIST_FIRST(head) ((head)->lh_first)
-
#define LIST_NEXT(elm, field) ((elm)->field.le_next)
/*
@@ -154,8 +154,8 @@
* Singly-linked List functions.
*/
#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
-
#define SLIST_FIRST(head) ((head)->slh_first)
+#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
#define SLIST_FOREACH(var, head, field) \
for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
@@ -244,8 +244,8 @@
/*
* Simple queue access methods.
*/
+#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL)
#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
-
#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
/*
@@ -320,6 +320,7 @@
/*
* Tail queue access methods.
*/
+#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
#define TAILQ_FIRST(head) ((head)->tqh_first)
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
@@ -410,11 +411,9 @@
/*
* Circular queue access methods.
*/
+#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head))
#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
-
#define CIRCLEQ_LAST(head) ((head)->cqh_last)
-
#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
-
#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
#endif /* !_SYS_QUEUE_H_ */
Home |
Main Index |
Thread Index |
Old Index