Added pbuf_ref_chain() which increases ref count of all pbufs in a chain.

This commit is contained in:
likewise
2002-11-11 11:22:49 +00:00
parent 6c977ad6ed
commit ad55cb6733
2 changed files with 17 additions and 3 deletions

View File

@@ -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():
*