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:
Dmitriy Linikov 2018-02-20 18:37:32 +00:00 committed by Gregory Nutt
parent c755ac0316
commit 2f2fb92ae3
5 changed files with 5 additions and 5 deletions

View File

@ -338,7 +338,7 @@ int telnetd_start(FAR struct telnetd_config_s *config)
if (ret < 0)
{
DEBUGASSERT(errno == -EINTR);
DEBUGASSERT(errno == EINTR || errno == ECANCELED);
}
}
while (ret < 0);

View File

@ -121,7 +121,7 @@ int cpuhog_main(int argc, char *argv[])
while (sem_wait(&g_state.sem) != 0)
{
ASSERT(errno == EINTR);
ASSERT(errno == EINTR || errno == ECANCELED);
}
/* Burn some inside semlock */

View File

@ -113,7 +113,7 @@ int passwd_lock(FAR sem_t **semp)
while (sem_wait(sem) < 0)
{
int errcode = errno;
DEBUGASSERT(errcode == EINTR);
DEBUGASSERT(errcode == EINTR || errcode == ECANCELED);
UNUSED(errcode);
}

View File

@ -461,7 +461,7 @@ int telnetd_start(FAR struct telnetd_config_s *config)
if (ret < 0)
{
DEBUGASSERT(errno == -EINTR);
DEBUGASSERT(errno == EINTR || errno == ECANCELED);
}
}
while (ret < 0);

View File

@ -153,7 +153,7 @@ static inline void cgi_semtake(void)
* awakened by a signal.
*/
ASSERT(errno == EINTR);
ASSERT(errno == EINTR || errno == ECANCELED);
}
}