PERFORCE change 165932 for review

Andre Oppermann andre at FreeBSD.org
Sat Jul 11 15:30:28 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=165932

Change 165932 by andre at andre_flirtbox on 2009/07/11 15:29:45

	Add svn#186479 and svn#189204 by bms.

Affected files ...

.. //depot/projects/tcp_new/sys/tree.h#2 edit

Differences ...

==== //depot/projects/tcp_new/sys/tree.h#2 (text+ko) ====

@@ -737,9 +737,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_ */


More information about the p4-projects mailing list