summaryrefslogtreecommitdiff
path: root/libc/misc
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2008-03-27 13:22:15 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2008-03-27 13:22:15 +0000
commitca1bbff0ee443807a36d8c7bf798672589ac37f6 (patch)
tree5c44adf6728cbd3c1c4cf17f106a8c7801206be2 /libc/misc
parent1bc40ce17eb32360b2e6e8752e0c5a4ef729e375 (diff)
Merge changes between r5247 and r5678 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@5679 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/sys/queue.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/libc/misc/sys/queue.h b/libc/misc/sys/queue.h
index b0e6b38c1..daf4553d3 100644
--- a/libc/misc/sys/queue.h
+++ b/libc/misc/sys/queue.h
@@ -271,6 +271,14 @@ struct { \
(var); \
(var) = ((var)->field.stqe_next))
+#define STAILQ_CONCAT(head1, head2) do { \
+ if (!STAILQ_EMPTY((head2))) { \
+ *(head1)->stqh_last = (head2)->stqh_first; \
+ (head1)->stqh_last = (head2)->stqh_last; \
+ STAILQ_INIT((head2)); \
+ } \
+} while (/*CONSTCOND*/0)
+
/*
* Singly-linked Tail queue access methods.
*/
@@ -434,6 +442,15 @@ struct { \
(var); \
(var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
+#define TAILQ_CONCAT(head1, head2, field) do { \
+ if (!TAILQ_EMPTY(head2)) { \
+ *(head1)->tqh_last = (head2)->tqh_first; \
+ (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \
+ (head1)->tqh_last = (head2)->tqh_last; \
+ TAILQ_INIT((head2)); \
+ } \
+} while (/*CONSTCOND*/0)
+
/*
* Tail queue access methods.
*/