net/local: Fixed deadlock issue by replacing nxsem_wait() with net_lockedwait() so that we do not wait with the network locked.
This commit is contained in:
parent
656c20fd4a
commit
81a3ec250e
@ -70,7 +70,7 @@ static int local_waitlisten(FAR struct local_conn_s *server)
|
|||||||
{
|
{
|
||||||
/* No.. wait for a connection or a signal */
|
/* No.. wait for a connection or a signal */
|
||||||
|
|
||||||
ret = nxsem_wait(&server->lc_waitsem);
|
ret = net_lockedwait(&server->lc_waitsem);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||||
|
@ -97,7 +97,7 @@ static inline void _local_semtake(sem_t *sem)
|
|||||||
{
|
{
|
||||||
/* Take the semaphore (perhaps waiting) */
|
/* Take the semaphore (perhaps waiting) */
|
||||||
|
|
||||||
ret = nxsem_wait(sem);
|
ret = net_lockedwait(sem);
|
||||||
|
|
||||||
/* The only case that an error should occur here is if the wait was
|
/* The only case that an error should occur here is if the wait was
|
||||||
* awakened by a signal.
|
* awakened by a signal.
|
||||||
|
Loading…
Reference in New Issue
Block a user