Lines Matching full:list
187 * @next: Next buffer in list
188 * @prev: Previous buffer in list
410 * @list: queue head
414 static inline int skb_queue_empty(const struct sk_buff_head *list)
416 return list->next == (struct sk_buff *)list;
556 * @list_: list to peek at
560 * list and someone else may run off with it. You must hold
563 * Returns %NULL for an empty list or a pointer to the head element.
569 struct sk_buff *list = ((struct sk_buff *)list_)->next;
570 if (list == (struct sk_buff *)list_)
571 list = NULL;
572 return list;
577 * @list_: list to peek at
581 * list and someone else may run off with it. You must hold
584 * Returns %NULL for an empty list or a pointer to the tail element.
590 struct sk_buff *list = ((struct sk_buff *)list_)->prev;
591 if (list == (struct sk_buff *)list_)
592 list = NULL;
593 return list;
598 * @list_: list to measure
615 static inline void skb_queue_head_init(struct sk_buff_head *list)
617 spin_lock_init(&list->lock);
618 list->prev = list->next = (struct sk_buff *)list;
619 list->qlen = 0;
623 * Insert an sk_buff at the start of a list.
630 * __skb_queue_after - queue a buffer at the list head
631 * @list: list to use
635 * Queue a buffer int the middle of a list. This function takes no locks
640 static inline void __skb_queue_after(struct sk_buff_head *list,
645 list->qlen++;
654 * __skb_queue_head - queue a buffer at the list head
655 * @list: list to use
658 * Queue a buffer at the start of a list. This function takes no locks
663 extern void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk);
664 static inline void __skb_queue_head(struct sk_buff_head *list,
667 __skb_queue_after(list, (struct sk_buff *)list, newsk);
671 * __skb_queue_tail - queue a buffer at the list tail
672 * @list: list to use
675 * Queue a buffer at the end of a list. This function takes no locks
680 extern void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk);
681 static inline void __skb_queue_tail(struct sk_buff_head *list,
686 list->qlen++;
687 next = (struct sk_buff *)list;
697 * @list: list to dequeue from
699 * Remove the head of the list. This function does not take any locks
701 * returned or %NULL if the list is empty.
703 extern struct sk_buff *skb_dequeue(struct sk_buff_head *list);
704 static inline struct sk_buff *__skb_dequeue(struct sk_buff_head *list)
708 prev = (struct sk_buff *) list;
714 list->qlen--;
724 * Insert a packet on a list.
726 extern void skb_insert(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list);
729 struct sk_buff_head *list)
734 list->qlen++;
738 * Place a packet after a given packet in a list.
740 extern void skb_append(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list);
741 static inline void __skb_append(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list)
743 __skb_insert(newsk, old, old->next, list);
747 * remove sk_buff from list. _Must_ be called atomically, and with
748 * the list known..
750 extern void skb_unlink(struct sk_buff *skb, struct sk_buff_head *list);
751 static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
755 list->qlen--;
768 * @list: list to dequeue from
770 * Remove the tail of the list. This function does not take any locks
772 * returned or %NULL if the list is empty.
774 extern struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list);
775 static inline struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list)
777 struct sk_buff *skb = skb_peek_tail(list);
779 __skb_unlink(skb, list);
1074 * __skb_queue_purge - empty a list
1075 * @list: list to empty
1077 * Delete all buffers on an &sk_buff list. Each buffer is removed from
1078 * the list and one reference dropped. This function does not take the
1079 * list lock and the caller must hold the relevant locks to use it.
1081 extern void skb_queue_purge(struct sk_buff_head *list);
1082 static inline void __skb_queue_purge(struct sk_buff_head *list)
1085 while ((skb = __skb_dequeue(list)) != NULL)