mm/iob: rename the iob_free_queue() to iob_destroy_queue()

make the semantics more precise

Change-Id: Ie3ac87d6a478cdd65e9129e708afc833f0a124b0
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2021-02-26 20:27:35 +08:00
parent 63829c6895
commit af341ee4fc
12 changed files with 23 additions and 23 deletions
+3 -3
View File
@@ -163,7 +163,7 @@ Public Function Prototypes
- :c:func:`iob_tryadd_queue()`
- :c:func:`iob_remove_queue()`
- :c:func:`iob_peek_queue()`
- :c:func:`iob_free_queue()`
- :c:func:`iob_destroy_queue()`
- :c:func:`iob_copyin()`
- :c:func:`iob_trycopyin()`
- :c:func:`iob_copyout()`
@@ -231,9 +231,9 @@ Public Function Prototypes
:return: Returns a reference to the I/O buffer chain at
the head of the queue.
.. c:function:: void iob_free_queue(FAR struct iob_queue_s *qhead);
.. c:function:: void iob_destroy_queue(FAR struct iob_queue_s *qhead);
Free an entire queue of I/O buffer chains.
Destroy all I/O buffer chains from the iob queue.
.. c:function:: int iob_copyin(FAR struct iob_s *iob, FAR const uint8_t *src, \
unsigned int len, unsigned int offset, bool throttled);
+4 -4
View File
@@ -428,16 +428,16 @@ FAR struct iob_s *iob_peek_queue(FAR struct iob_queue_s *iobq);
#endif
/****************************************************************************
* Name: iob_free_queue
* Name: iob_destroy_queue
*
* Description:
* Free an entire queue of I/O buffer chains.
* Destroy all I/O buffer chains from the iob queue.
*
****************************************************************************/
#if CONFIG_IOB_NCHAINS > 0
void iob_free_queue(FAR struct iob_queue_s *qhead,
enum iob_user_e producerid);
void iob_destroy_queue(FAR struct iob_queue_s *qhead,
enum iob_user_e producerid);
#endif /* CONFIG_IOB_NCHAINS > 0 */
/****************************************************************************
+1 -1
View File
@@ -39,7 +39,7 @@ ifeq ($(CONFIG_MM_IOB),y)
CSRCS += iob_add_queue.c iob_alloc.c iob_alloc_qentry.c iob_clone.c
CSRCS += iob_concat.c iob_copyin.c iob_copyout.c iob_contig.c iob_free.c
CSRCS += iob_free_chain.c iob_free_qentry.c iob_free_queue.c
CSRCS += iob_free_chain.c iob_free_qentry.c iob_destroy_queue.c
CSRCS += iob_get_queue_count.c
CSRCS += iob_initialize.c iob_pack.c iob_peek_queue.c iob_remove_queue.c
CSRCS += iob_statistics.c iob_trimhead.c iob_trimhead_queue.c iob_trimtail.c
@@ -1,5 +1,5 @@
/****************************************************************************
* mm/iob/iob_free_queue.c
* mm/iob/iob_destroy_queue.c
*
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -60,15 +60,15 @@
****************************************************************************/
/****************************************************************************
* Name: iob_free_queue
* Name: iob_destroy_queue
*
* Description:
* Free an entire queue of I/O buffer chains.
* Destroy all I/O buffer chains from the iob queue.
*
****************************************************************************/
void iob_free_queue(FAR struct iob_queue_s *qhead,
enum iob_user_e producerid)
void iob_destroy_queue(FAR struct iob_queue_s *qhead,
enum iob_user_e producerid)
{
FAR struct iob_qentry_s *iobq;
FAR struct iob_qentry_s *nextq;
+1 -1
View File
@@ -483,7 +483,7 @@ errout:
conn->nreqs = 0;
conn->dev = NULL;
iob_free_queue(&conn->readahead, IOBUSER_NET_SOCK_ICMP);
iob_destroy_queue(&conn->readahead, IOBUSER_NET_SOCK_ICMP);
}
return ret;
+2 -2
View File
@@ -340,7 +340,7 @@ ssize_t icmp_sendto(FAR struct socket *psock, FAR const void *buf,
conn->nreqs = 0;
conn->dev = NULL;
iob_free_queue(&conn->readahead, IOBUSER_NET_SOCK_ICMP);
iob_destroy_queue(&conn->readahead, IOBUSER_NET_SOCK_ICMP);
}
#ifdef CONFIG_NET_ARP_SEND
@@ -448,7 +448,7 @@ errout:
conn->nreqs = 0;
conn->dev = NULL;
iob_free_queue(&conn->readahead, IOBUSER_NET_SOCK_ICMP);
iob_destroy_queue(&conn->readahead, IOBUSER_NET_SOCK_ICMP);
return ret;
}
+1 -1
View File
@@ -529,7 +529,7 @@ static int icmp_close(FAR struct socket *psock)
{
/* Yes... free any read-ahead data */
iob_free_queue(&conn->readahead, IOBUSER_NET_SOCK_ICMP);
iob_destroy_queue(&conn->readahead, IOBUSER_NET_SOCK_ICMP);
/* Then free the connection structure */
+1 -1
View File
@@ -494,7 +494,7 @@ errout:
conn->nreqs = 0;
conn->dev = NULL;
iob_free_queue(&conn->readahead, IOBUSER_NET_SOCK_ICMPv6);
iob_destroy_queue(&conn->readahead, IOBUSER_NET_SOCK_ICMPv6);
}
return ret;
+2 -2
View File
@@ -331,7 +331,7 @@ ssize_t icmpv6_sendto(FAR struct socket *psock, FAR const void *buf,
conn->nreqs = 0;
conn->dev = NULL;
iob_free_queue(&conn->readahead, IOBUSER_NET_SOCK_ICMPv6);
iob_destroy_queue(&conn->readahead, IOBUSER_NET_SOCK_ICMPv6);
}
#ifdef CONFIG_NET_ICMPv6_NEIGHBOR
@@ -439,7 +439,7 @@ errout:
conn->nreqs = 0;
conn->dev = NULL;
iob_free_queue(&conn->readahead, IOBUSER_NET_SOCK_ICMPv6);
iob_destroy_queue(&conn->readahead, IOBUSER_NET_SOCK_ICMPv6);
return ret;
}
+1 -1
View File
@@ -529,7 +529,7 @@ static int icmpv6_close(FAR struct socket *psock)
{
/* Yes... free any read-ahead data */
iob_free_queue(&conn->readahead, IOBUSER_NET_SOCK_ICMPv6);
iob_destroy_queue(&conn->readahead, IOBUSER_NET_SOCK_ICMPv6);
/* Then free the connection structure */
+1 -1
View File
@@ -787,7 +787,7 @@ void tcp_free(FAR struct tcp_conn_s *conn)
/* Release any read-ahead buffers attached to the connection */
iob_free_queue(&conn->readahead, IOBUSER_NET_TCP_READAHEAD);
iob_destroy_queue(&conn->readahead, IOBUSER_NET_TCP_READAHEAD);
#ifdef CONFIG_NET_TCP_WRITE_BUFFERS
/* Release any write buffers attached to the connection */
+1 -1
View File
@@ -628,7 +628,7 @@ void udp_free(FAR struct udp_conn_s *conn)
/* Release any read-ahead buffers attached to the connection */
iob_free_queue(&conn->readahead, IOBUSER_NET_UDP_READAHEAD);
iob_destroy_queue(&conn->readahead, IOBUSER_NET_UDP_READAHEAD);
#ifdef CONFIG_NET_UDP_WRITE_BUFFERS
/* Release any write buffers attached to the connection */