diff --git a/Documentation/reference/os/iob.rst b/Documentation/reference/os/iob.rst index c4d9e46dfe5..3d0f667a1c5 100644 --- a/Documentation/reference/os/iob.rst +++ b/Documentation/reference/os/iob.rst @@ -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); diff --git a/include/nuttx/mm/iob.h b/include/nuttx/mm/iob.h index 39255a98407..191cd75067c 100644 --- a/include/nuttx/mm/iob.h +++ b/include/nuttx/mm/iob.h @@ -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 */ /**************************************************************************** diff --git a/mm/iob/Make.defs b/mm/iob/Make.defs index 55ae98b70a1..1255319f839 100644 --- a/mm/iob/Make.defs +++ b/mm/iob/Make.defs @@ -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 diff --git a/mm/iob/iob_free_queue.c b/mm/iob/iob_destroy_queue.c similarity index 94% rename from mm/iob/iob_free_queue.c rename to mm/iob/iob_destroy_queue.c index 0bf14febdc6..2de475b5f1f 100644 --- a/mm/iob/iob_free_queue.c +++ b/mm/iob/iob_destroy_queue.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 @@ -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; diff --git a/net/icmp/icmp_recvfrom.c b/net/icmp/icmp_recvfrom.c index 20ef214904a..deee4497b0a 100644 --- a/net/icmp/icmp_recvfrom.c +++ b/net/icmp/icmp_recvfrom.c @@ -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; diff --git a/net/icmp/icmp_sendto.c b/net/icmp/icmp_sendto.c index cb49320a0bc..a7fdc3ca4b8 100644 --- a/net/icmp/icmp_sendto.c +++ b/net/icmp/icmp_sendto.c @@ -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; } diff --git a/net/icmp/icmp_sockif.c b/net/icmp/icmp_sockif.c index 2b1e17946f8..4564cf6ea15 100644 --- a/net/icmp/icmp_sockif.c +++ b/net/icmp/icmp_sockif.c @@ -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 */ diff --git a/net/icmpv6/icmpv6_recvfrom.c b/net/icmpv6/icmpv6_recvfrom.c index 1ed07094e25..82336d97dba 100644 --- a/net/icmpv6/icmpv6_recvfrom.c +++ b/net/icmpv6/icmpv6_recvfrom.c @@ -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; diff --git a/net/icmpv6/icmpv6_sendto.c b/net/icmpv6/icmpv6_sendto.c index 8a275f0139c..49eaed15c53 100644 --- a/net/icmpv6/icmpv6_sendto.c +++ b/net/icmpv6/icmpv6_sendto.c @@ -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; } diff --git a/net/icmpv6/icmpv6_sockif.c b/net/icmpv6/icmpv6_sockif.c index 3dbb5c82e47..4fe9e260113 100644 --- a/net/icmpv6/icmpv6_sockif.c +++ b/net/icmpv6/icmpv6_sockif.c @@ -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 */ diff --git a/net/tcp/tcp_conn.c b/net/tcp/tcp_conn.c index b16a0cb641d..8d6c806815a 100644 --- a/net/tcp/tcp_conn.c +++ b/net/tcp/tcp_conn.c @@ -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 */ diff --git a/net/udp/udp_conn.c b/net/udp/udp_conn.c index 7a784ab900f..6a430885776 100644 --- a/net/udp/udp_conn.c +++ b/net/udp/udp_conn.c @@ -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 */