Re: Concatenating Queues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



maybe this sounds stupid, but here goes: how about adding queue2 head
to queue1 tail ?

anupam

Frank.Uepping@t-online.de (Frank A. Uepping) writes:

> Hi,
> I want to concatenate 2 queues together.
> Currently I do this:
>
> struct sk_buff *skb;
> while ((skb = skb_dequeue(&queue1)))
> 	skb_queue_tail(&queue2, skb);
>
> Is there a faster way to achieve this instead of
> dequeuing/enqueuing each piece separately?
>
> /FAU
>
>
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
>
>

-- 
...mathematicians do it smoothly and continuously or discretely in groups and in fields.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux