Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148047296
D50131.1785210761.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
705 B
Referenced Files
None
Subscribers
None
D50131.1785210761.diff
View Options
diff --git a/sys/sys/queue.h b/sys/sys/queue.h
--- a/sys/sys/queue.h
+++ b/sys/sys/queue.h
@@ -564,6 +564,21 @@
(head2)->stqh_last = &STAILQ_FIRST(head2); \
} while (0)
+#define STAILQ_REVERSE(head, type, field) do { \
+ if (STAILQ_EMPTY(head)) \
+ break; \
+ QUEUE_TYPEOF(type) *_Var, *_Varp, *_Varn; \
+ for (_Var = STAILQ_FIRST(head), _Varp = NULL; \
+ _Var != NULL;) { \
+ _Varn = STAILQ_NEXT(_Var, field); \
+ STAILQ_NEXT(_Var, field) = _Varp; \
+ _Varp = _Var; \
+ _Var = _Varn; \
+ } \
+ (head)->stqh_last = &STAILQ_NEXT(STAILQ_FIRST(head), field); \
+ (head)->stqh_first = _Varp; \
+} while (0)
+
#define STAILQ_END(head) NULL
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jul 28, 3:52 AM (1 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29286271
Default Alt Text
D50131.1785210761.diff (705 B)
Attached To
Mode
D50131: sys/queue.h: add STAILQ_REVERSE
Attached
Detach File
Event Timeline
Log In to Comment