aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2008-04-14 03:05:28 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-14 03:05:28 -0400
commitf5572855ec492334d8c3ec0e0e86c31865d5cf07 (patch)
treeb33ff667553a0592d621a02852964afc926ee0f3 /include
parent7de6c033367ab86f39c7723392caf73325cbf286 (diff)
[SKB]: __skb_queue_tail = __skb_insert before
This expresses __skb_queue_tail() in terms of __skb_insert(), using __skb_insert_before() as auxiliary function. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/skbuff.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 83c851846829..11fd9f2c4093 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -700,6 +700,13 @@ static inline void __skb_queue_after(struct sk_buff_head *list,
700extern void skb_append(struct sk_buff *old, struct sk_buff *newsk, 700extern void skb_append(struct sk_buff *old, struct sk_buff *newsk,
701 struct sk_buff_head *list); 701 struct sk_buff_head *list);
702 702
703static inline void __skb_queue_before(struct sk_buff_head *list,
704 struct sk_buff *next,
705 struct sk_buff *newsk)
706{
707 __skb_insert(newsk, next->prev, next, list);
708}
709
703/** 710/**
704 * __skb_queue_head - queue a buffer at the list head 711 * __skb_queue_head - queue a buffer at the list head
705 * @list: list to use 712 * @list: list to use
@@ -731,14 +738,7 @@ extern void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk);
731static inline void __skb_queue_tail(struct sk_buff_head *list, 738static inline void __skb_queue_tail(struct sk_buff_head *list,
732 struct sk_buff *newsk) 739 struct sk_buff *newsk)
733{ 740{
734 struct sk_buff *prev, *next; 741 __skb_queue_before(list, (struct sk_buff *)list, newsk);
735
736 list->qlen++;
737 next = (struct sk_buff *)list;
738 prev = next->prev;
739 newsk->next = next;
740 newsk->prev = prev;
741 next->prev = prev->next = newsk;
742} 742}
743 743
744/* 744/*