Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149234634
D50131.1789724483.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.1789724483.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
Fri, Sep 18, 9:41 AM (6 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29723441
Default Alt Text
D50131.1789724483.diff (705 B)
Attached To
Mode
D50131: sys/queue.h: add STAILQ_REVERSE
Attached
Detach File
Event Timeline
Log In to Comment