Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144311516
D50131.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
705 B
Referenced Files
None
Subscribers
None
D50131.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
Sun, Feb 8, 7:11 PM (1 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28486981
Default Alt Text
D50131.diff (705 B)
Attached To
Mode
D50131: sys/queue.h: add STAILQ_REVERSE
Attached
Detach File
Event Timeline
Log In to Comment