mirror of
https://github.com/apache/nuttx.git
synced 2026-08-06 13:08:59 +00:00
net/can,udp,tcp: add sem destroy for udp/tcp sndsem;
standardize the usage of semphore Signed-off-by: wangjinjing1 <wangjinjing1@xiaomi.com>
This commit is contained in:
parent
8c92be874f
commit
232ef950c6
4 changed files with 12 additions and 4 deletions
|
|
@ -163,6 +163,10 @@ void can_free(FAR struct can_conn_s *conn)
|
|||
can_sendbuffer_notify(conn);
|
||||
# endif /* CONFIG_NET_SEND_BUFSIZE */
|
||||
|
||||
#endif
|
||||
|
||||
#if CONFIG_NET_SEND_BUFSIZE > 0
|
||||
nxsem_destroy(&conn->sndsem);
|
||||
#endif
|
||||
|
||||
/* Free the connection. */
|
||||
|
|
|
|||
|
|
@ -518,10 +518,6 @@ static int can_close(FAR struct socket *psock)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_NET_SEND_BUFSIZE > 0
|
||||
nxsem_destroy(&conn->sndsem);
|
||||
#endif
|
||||
|
||||
/* Free the connection structure */
|
||||
|
||||
conn->crefs = 0;
|
||||
|
|
|
|||
|
|
@ -887,6 +887,10 @@ void tcp_free(FAR struct tcp_conn_s *conn)
|
|||
|
||||
#endif
|
||||
|
||||
#if CONFIG_NET_SEND_BUFSIZE > 0
|
||||
nxsem_destroy(&conn->snd_sem);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_TCPBACKLOG
|
||||
/* Remove any backlog attached to this connection */
|
||||
|
||||
|
|
|
|||
|
|
@ -647,6 +647,10 @@ void udp_free(FAR struct udp_conn_s *conn)
|
|||
udp_sendbuffer_notify(conn);
|
||||
#endif /* CONFIG_NET_SEND_BUFSIZE */
|
||||
|
||||
#endif
|
||||
|
||||
#if CONFIG_NET_SEND_BUFSIZE > 0
|
||||
nxsem_destroy(&conn->sndsem);
|
||||
#endif
|
||||
|
||||
/* Free the connection. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue