First step to clean up pbuf implementation: add pbuf_alloc_reference() to allocate pbufs referencing external payload; move member initialization to common function; simplify PBUF_POOL chain allocator

This commit is contained in:
goldsimon
2017-04-25 23:04:12 +02:00
parent e57552d401
commit eb269e61b5
2 changed files with 104 additions and 104 deletions

View File

@@ -240,6 +240,7 @@ void pbuf_free_ooseq(void);
#define pbuf_init()
struct pbuf *pbuf_alloc(pbuf_layer l, u16_t length, pbuf_type type);
struct pbuf *pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type);
#if LWIP_SUPPORT_CUSTOM_PBUF
struct pbuf *pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type,
struct pbuf_custom *p, void *payload_mem,