net/bufpool: Call init automatically on alloc

Note: Initialize function of protocols (tcp, udp, pkt, etc.) are kept empty.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
This commit is contained in:
Zhe Weng
2025-01-02 12:10:09 +08:00
committed by Xiang Xiao
parent f702f1705f
commit 50b3ab7671
27 changed files with 23 additions and 272 deletions
-16
View File
@@ -61,22 +61,6 @@ NET_BUFPOOL_DECLARE(g_wrbuffer, sizeof(struct udp_wrbuffer_s),
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: udp_wrbuffer_initialize
*
* Description:
* Initialize the list of free write buffers
*
* Assumptions:
* Called once early initialization.
*
****************************************************************************/
void udp_wrbuffer_initialize(void)
{
NET_BUFPOOL_INIT(g_wrbuffer);
}
/****************************************************************************
* Name: udp_wrbuffer_alloc
*