mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
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:
committed by
Alan C. Assis
parent
aee7ea0d7d
commit
8f41613374
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user