net: replace net_sem*wait with conn_dev_sem*wait to simplify code logic

optimize the current code format according to the previous net_xxx_wait
implementation to reduce multiple calls of similar code

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu
2025-11-24 20:17:18 +08:00
committed by Alan C. Assis
parent aee7ea0d7d
commit 8f41613374
42 changed files with 196 additions and 205 deletions
+3 -2
View File
@@ -263,8 +263,9 @@ ssize_t can_sendmsg(FAR struct socket *psock, FAR struct msghdr *msg,
goto errout_with_lock;
}
ret = net_sem_timedwait_uninterruptible(&conn->sndsem,
_SO_TIMEOUT(conn->sconn.s_sndtimeo));
ret = conn_dev_sem_timedwait(&conn->sndsem, false,
_SO_TIMEOUT(conn->sconn.s_sndtimeo),
&conn->sconn, dev);
if (ret < 0)
{
goto errout_with_lock;