Use TailQ in mbuf

This commit is contained in:
Nils O. Selåsdal
2013-12-10 01:11:31 +01:00
parent 6891a77ba9
commit 2dc5242fc0
3 changed files with 8 additions and 8 deletions
+2 -1
View File
@@ -43,13 +43,14 @@ uint8_t *uc_mbuf_pull(struct MBuf *mbuf, uint32_t size)
void uc_mbuf_init(struct MBuf *mbuf, uint8_t *buf, uint32_t len, uint32_t headroom, uint32_t flags)
{
mbuf->bufstart = buf;
mbuf->next = NULL;
mbuf->p1 = mbuf->p2 = mbuf->p3 = mbuf->p4 = NULL;
mbuf->cookie = NULL;
mbuf->flags = flags;
mbuf->allocated = len + headroom;
mbuf->head = mbuf->bufstart + headroom;
mbuf->tail = mbuf->head;
mbuf->entry.next = NULL;
mbuf->entry.prev = NULL;
}
struct MBuf *uc_mbuf_new_hr(uint32_t len, uint32_t headroom)