mirror of
https://github.com/apache/nuttx.git
synced 2026-05-10 07:18:49 +08: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:
committed by
Alan C. Assis
parent
efd8e1be2b
commit
aee7ea0d7d
+2
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user