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
+6 -6
View File
@@ -388,7 +388,7 @@ static int tsc2007_waitsample(FAR struct tsc2007_dev_s *priv,
*/
ierr("ERROR: nxsem_wait failed: %d\n", ret);
DEBUGASSERT(ret == -EINTR);
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
goto errout;
}
}
@@ -822,7 +822,7 @@ static int tsc2007_open(FAR struct file *filep)
/* This should only happen if the wait was cancelled by an signal */
ierr("ERROR: nxsem_wait failed: %d\n", ret);
DEBUGASSERT(ret == -EINTR);
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
return ret;
}
@@ -878,7 +878,7 @@ static int tsc2007_close(FAR struct file *filep)
/* This should only happen if the wait was cancelled by an signal */
ierr("ERROR: nxsem_wait failed: %d\n", ret);
DEBUGASSERT(ret == -EINTR);
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
return ret;
}
@@ -936,7 +936,7 @@ static ssize_t tsc2007_read(FAR struct file *filep, FAR char *buffer, size_t len
/* This should only happen if the wait was cancelled by an signal */
ierr("ERROR: nxsem_wait failed: %d\n", ret);
DEBUGASSERT(ret == -EINTR);
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
return ret;
}
@@ -1053,7 +1053,7 @@ static int tsc2007_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
/* This should only happen if the wait was cancelled by an signal */
ierr("ERROR: nxsem_wait failed: %d\n", ret);
DEBUGASSERT(ret == -EINTR);
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
return ret;
}
@@ -1130,7 +1130,7 @@ static int tsc2007_poll(FAR struct file *filep, FAR struct pollfd *fds,
/* This should only happen if the wait was cancelled by an signal */
ierr("ERROR: nxsem_wait failed: %d\n", ret);
DEBUGASSERT(ret == -EINTR);
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
return ret;
}