mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 20:56:47 +08:00
net: use netdev_lock to protect netdev_txnotify_dev
since the type of sconn lock is rmutex, there is no need to release sconn lock before TX Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
@@ -403,13 +403,13 @@ ssize_t icmp_sendmsg(FAR struct socket *psock, FAR struct msghdr *msg,
|
||||
|
||||
/* Notify the device driver of the availability of TX data */
|
||||
|
||||
conn_dev_unlock(&conn->sconn, dev);
|
||||
netdev_txnotify_dev(dev);
|
||||
|
||||
/* Wait for either the send to complete or for timeout to occur.
|
||||
* net_sem_timedwait will also terminate if a signal is received.
|
||||
*/
|
||||
|
||||
conn_dev_unlock(&conn->sconn, dev);
|
||||
ret = net_sem_timedwait(&state.snd_sem,
|
||||
_SO_TIMEOUT(conn->sconn.s_sndtimeo));
|
||||
conn_dev_lock(&conn->sconn, dev);
|
||||
|
||||
Reference in New Issue
Block a user