Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Add some missing macros from FreeBSD. man page chang...
details: https://anonhg.NetBSD.org/src/rev/0eb700bcef41
branches: trunk
changeset: 785769:0eb700bcef41
user: christos <christos%NetBSD.org@localhost>
date: Fri Mar 29 20:20:22 2013 +0000
description:
Add some missing macros from FreeBSD. man page changes incoming.
diffstat:
sys/sys/tree.h | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diffs (39 lines):
diff -r 0c3cc08081a1 -r 0eb700bcef41 sys/sys/tree.h
--- a/sys/sys/tree.h Fri Mar 29 20:17:19 2013 +0000
+++ b/sys/sys/tree.h Fri Mar 29 20:20:22 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.h,v 1.16 2008/03/21 13:07:15 ad Exp $ */
+/* $NetBSD: tree.h,v 1.17 2013/03/29 20:20:22 christos Exp $ */
/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */
/*
* Copyright 2002 Niels Provos <provos%citi.umich.edu@localhost>
@@ -733,9 +733,29 @@
(x) != NULL; \
(x) = name##_RB_NEXT(x))
+#define RB_FOREACH_FROM(x, name, y) \
+ for ((x) = (y); \
+ ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \
+ (x) = (y))
+
+#define RB_FOREACH_SAFE(x, name, head, y) \
+ for ((x) = RB_MIN(name, head); \
+ ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \
+ (x) = (y))
+
#define RB_FOREACH_REVERSE(x, name, head) \
for ((x) = RB_MAX(name, head); \
(x) != NULL; \
(x) = name##_RB_PREV(x))
+#define RB_FOREACH_REVERSE_FROM(x, name, y) \
+ for ((x) = (y); \
+ ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
+ (x) = (y))
+
+#define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \
+ for ((x) = RB_MAX(name, head); \
+ ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
+ (x) = (y))
+
#endif /* _SYS_TREE_H_ */
Home |
Main Index |
Thread Index |
Old Index