ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

static __inline struct sk_buff* skb_unshare ( struct sk_buff skb,
int  pri 
) [static, read]

skb_unshare - make a copy of a shared buffer : buffer to check : priority for memory allocation

If the socket buffer is a clone then this function creates a new copy of the data, drops a reference count on the old copy and returns the new copy with the reference count at 1. If the buffer is not a clone the original buffer is returned. When called with a spinlock held or from interrupt state must be GFP_ATOMIC

NULL is returned on a memory allocation failure.

Definition at line 384 of file tcpcore.h.

{
    struct sk_buff *nskb;
    if(!skb_cloned(skb))
        return skb;
    nskb=skb_copy(skb, pri);
    kfree_skb(skb);     /* Free our shared copy */
    return nskb;
}

Generated on Fri May 25 2012 05:23:12 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.