Merged in hardlulz/modem-3.0-nuttx/fix-sem-EINTR (pull request #603)

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:24:53 +00:00
committed by Gregory Nutt
parent 9e8332e5c8
commit a8c58607e9
61 changed files with 122 additions and 126 deletions
+2 -2
View File
@@ -444,7 +444,7 @@ static ssize_t mac802154dev_read(FAR struct file *filep, FAR char *buffer,
ret = nxsem_wait(&dev->readsem);
if (ret < 0)
{
DEBUGASSERT(ret == -EINTR);
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
dev->readpending = false;
return ret;
}
@@ -681,7 +681,7 @@ static int mac802154dev_ioctl(FAR struct file *filep, int cmd,
ret = nxsem_wait(&dev->geteventsem);
if (ret < 0)
{
DEBUGASSERT(ret == -EINTR);
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
dev->geteventpending = false;
return ret;
}
+2 -2
View File
@@ -533,9 +533,9 @@ static inline int mac802154_takesem(sem_t *sem, bool allowinterrupt)
ret = nxsem_wait(sem);
if (ret < 0)
{
/* EINTR is the only error that we expect */
/* EINTR and ECANCELED are the only errors that we expect */
DEBUGASSERT(ret == -EINTR);
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
if (allowinterrupt)
{
+1 -1
View File
@@ -1114,7 +1114,7 @@ static int macnet_ioctl(FAR struct net_driver_s *dev, int cmd,
ret = nxsem_wait(&priv->md_eventsem);
if (ret < 0)
{
DEBUGASSERT(ret == -EINTR);
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
priv->md_eventpending = false;
return ret;
}