Add mbuf enqueue/dequeue functions
This commit is contained in:
+13
-1
@@ -181,7 +181,7 @@ uint8_t *uc_mbuf_put(struct MBuf *mbuf, uint32_t size);
|
||||
* data in the buffer, retreating the head pointer by size butes
|
||||
* You need to insert the size bytes in the returned pointer.
|
||||
*
|
||||
* @oaram size bytes to prepend to the buffer
|
||||
w* @oaram size bytes to prepend to the buffer
|
||||
* @return NULL if the mbuf does not have enough headroom
|
||||
*/
|
||||
uint8_t *uc_mbuf_push(struct MBuf *mbuf, uint32_t size);
|
||||
@@ -214,4 +214,16 @@ static UC_INLINE uint8_t *uc_mbuf_head(struct MBuf* mbuf)
|
||||
return mbuf->head;
|
||||
}
|
||||
|
||||
/** Add the mbuf at the end of the tailq.
|
||||
* This uses the tailQ entry member of the mbuf.
|
||||
*/
|
||||
void uc_mbuf_enqueue(struct MBuf *mbuf, struct TailQ *head);
|
||||
|
||||
/** Remove and return the mbuf at the start of the tailq.
|
||||
* @return the first mbuf in the queue, or NULL if ti isempty.
|
||||
*/
|
||||
struct MBuf *uc_mbuf_dequeue(struct TailQ *head);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user