mirror of
https://github.com/apache/nuttx.git
synced 2026-08-02 04:38:59 +00:00
net/utils: conn_dev_sem_timedwait supports the input parameter sconn being NULL
thus supporting scenarios that only require break netdev_lock. Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
parent
efd8e1be2b
commit
aee7ea0d7d
1 changed files with 2 additions and 1 deletions
|
|
@ -211,7 +211,8 @@ conn_dev_sem_timedwait(FAR sem_t *sem, bool interruptible,
|
|||
unsigned int timeout, FAR struct socket_conn_s *sconn,
|
||||
FAR struct net_driver_s *dev)
|
||||
{
|
||||
return net_sem_timedwait2(sem, interruptible, timeout, &sconn->s_lock,
|
||||
return net_sem_timedwait2(sem, interruptible, timeout,
|
||||
sconn ? &sconn->s_lock : NULL,
|
||||
dev ? &dev->d_lock : NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue