mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
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:
@@ -480,21 +480,6 @@ int udp_setsockopt(FAR struct socket *psock, int option,
|
||||
FAR const void *value, socklen_t value_len);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: udp_wrbuffer_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the list of free write buffers
|
||||
*
|
||||
* Assumptions:
|
||||
* Called once early initialization.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_UDP_WRITE_BUFFERS
|
||||
void udp_wrbuffer_initialize(void);
|
||||
#endif /* CONFIG_NET_UDP_WRITE_BUFFERS */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: udp_wrbuffer_alloc
|
||||
*
|
||||
|
||||
@@ -549,7 +549,6 @@ errout:
|
||||
|
||||
void udp_initialize(void)
|
||||
{
|
||||
NET_BUFPOOL_INIT(g_udp_connections);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user