mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-08 08:33:39 +08:00
Added pbuf_ref_chain() which increases ref count of all pbufs in a chain.
This commit is contained in:
@@ -555,6 +555,20 @@ pbuf_ref(struct pbuf *p)
|
||||
}
|
||||
++(p->ref);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
/* pbuf_ref_chain():
|
||||
*
|
||||
* Increments the reference count of all pbufs in a chain.
|
||||
*/
|
||||
void
|
||||
pbuf_ref_chain(struct pbuf *p)
|
||||
{
|
||||
while (p != NULL) {
|
||||
p->ref++;
|
||||
p=p->next;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* pbuf_chain():
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user