Corrected more pbuf.c functions to comply with pbuf->ref and ->tot_len invariant.

This commit is contained in:
likewise
2003-03-30 22:24:10 +00:00
parent 2bd3d51fcf
commit c50f80da92
2 changed files with 192 additions and 258 deletions

View File

@@ -74,8 +74,14 @@ struct pbuf {
/* Length of this buffer. */
u16_t len;
/* Flags and reference count. */
u16_t flags, ref;
/* flags */
u16_t flags;
/** the reference count always equals the number of pointers
* that refer to this pbuf. This can be pointers from an application,
* the stack itself, or pbuf->next pointers from a chain.
*/
u16_t ref;
};