Merged in hardlulz/modem-3.0-nuttx-apps/fix-sem-EINTR (pull request #133)
Added ECANCELED condition to DEBUGASSERT-s checking sem_wait result Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
parent
c755ac0316
commit
2f2fb92ae3
@ -338,7 +338,7 @@ int telnetd_start(FAR struct telnetd_config_s *config)
|
|||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
DEBUGASSERT(errno == -EINTR);
|
DEBUGASSERT(errno == EINTR || errno == ECANCELED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (ret < 0);
|
while (ret < 0);
|
||||||
|
@ -121,7 +121,7 @@ int cpuhog_main(int argc, char *argv[])
|
|||||||
|
|
||||||
while (sem_wait(&g_state.sem) != 0)
|
while (sem_wait(&g_state.sem) != 0)
|
||||||
{
|
{
|
||||||
ASSERT(errno == EINTR);
|
ASSERT(errno == EINTR || errno == ECANCELED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Burn some inside semlock */
|
/* Burn some inside semlock */
|
||||||
|
@ -113,7 +113,7 @@ int passwd_lock(FAR sem_t **semp)
|
|||||||
while (sem_wait(sem) < 0)
|
while (sem_wait(sem) < 0)
|
||||||
{
|
{
|
||||||
int errcode = errno;
|
int errcode = errno;
|
||||||
DEBUGASSERT(errcode == EINTR);
|
DEBUGASSERT(errcode == EINTR || errcode == ECANCELED);
|
||||||
UNUSED(errcode);
|
UNUSED(errcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -461,7 +461,7 @@ int telnetd_start(FAR struct telnetd_config_s *config)
|
|||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
DEBUGASSERT(errno == -EINTR);
|
DEBUGASSERT(errno == EINTR || errno == ECANCELED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (ret < 0);
|
while (ret < 0);
|
||||||
|
@ -153,7 +153,7 @@ static inline void cgi_semtake(void)
|
|||||||
* awakened by a signal.
|
* awakened by a signal.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ASSERT(errno == EINTR);
|
ASSERT(errno == EINTR || errno == ECANCELED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user