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:
parent
9e8332e5c8
commit
a8c58607e9
@ -519,7 +519,7 @@ static void lpc43_takesem(struct lpc43_dev_s *priv)
|
||||
* awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(errno == EINTR);
|
||||
DEBUGASSERT(errno == EINTR || errno == ECANCELED);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -523,7 +523,7 @@ static void lpc54_takesem(struct lpc54_dev_s *priv)
|
||||
* awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(errno == EINTR);
|
||||
DEBUGASSERT(errno == EINTR || errno == ECANCELED);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -393,7 +393,7 @@ static int sam_tsd_waitsample(struct sam_tsd_s *priv, struct sam_sample_s *sampl
|
||||
*/
|
||||
|
||||
ierr("ERROR: nxsem_wait: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
goto errout;
|
||||
}
|
||||
}
|
||||
|
@ -321,7 +321,7 @@ static int up_waitsample(FAR struct up_dev_s *priv,
|
||||
* the failure now.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
goto errout;
|
||||
}
|
||||
}
|
||||
@ -411,7 +411,7 @@ static ssize_t up_read(FAR struct file *filep, FAR char *buffer, size_t len)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -509,7 +509,7 @@ static int up_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -553,7 +553,7 @@ static int up_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -815,4 +815,3 @@ int up_buttonevent(int x, int y, int buttons)
|
||||
up_notify(priv);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
@ -718,7 +718,7 @@ static int tc_waitsample(FAR struct tc_dev_s *priv,
|
||||
* the failure now.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
goto errout;
|
||||
}
|
||||
}
|
||||
@ -1131,7 +1131,7 @@ static int tc_open(FAR struct file *filep)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1186,7 +1186,7 @@ static int tc_close(FAR struct file *filep)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1243,7 +1243,7 @@ static ssize_t tc_read(FAR struct file *filep, FAR char *buffer, size_t len)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1355,7 +1355,7 @@ static int tc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1402,7 +1402,7 @@ static int tc_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -604,7 +604,7 @@ static int tc_waitsample(FAR struct tc_dev_s *priv,
|
||||
* the failure now.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
goto errout;
|
||||
}
|
||||
}
|
||||
@ -1000,7 +1000,7 @@ static int tc_open(FAR struct file *filep)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1055,7 +1055,7 @@ static int tc_close(FAR struct file *filep)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1112,7 +1112,7 @@ static ssize_t tc_read(FAR struct file *filep, FAR char *buffer, size_t len)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1224,7 +1224,7 @@ static int tc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1271,7 +1271,7 @@ static int tc_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,7 @@ static void ee24xx_semtake(FAR struct ee24xx_dev_s *eedev)
|
||||
* the wait was awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(errno == EINTR);
|
||||
DEBUGASSERT(errno == EINTR || errno == ECANCELED);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -768,7 +768,7 @@ static int ads7843e_open(FAR struct file *filep)
|
||||
{
|
||||
/* This should only happen if the wait was cancelled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -825,7 +825,7 @@ static int ads7843e_close(FAR struct file *filep)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -886,7 +886,7 @@ static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer, size_t le
|
||||
/* This should only happen if the wait was cancelled by an signal */
|
||||
|
||||
ierr("ERROR: nxsem_wait: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -998,7 +998,7 @@ static int ads7843e_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
/* This should only happen if the wait was cancelled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1058,7 +1058,7 @@ static int ads7843e_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
{
|
||||
/* This should only happen if the wait was cancelled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -685,7 +685,7 @@ static ssize_t ft5x06_waitsample(FAR struct ft5x06_dev_s *priv,
|
||||
*/
|
||||
|
||||
ierr("ERROR: nxsem_wait failed: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
goto errout;
|
||||
}
|
||||
}
|
||||
@ -812,7 +812,7 @@ static int ft5x06_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;
|
||||
}
|
||||
|
||||
@ -874,7 +874,7 @@ static int ft5x06_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;
|
||||
}
|
||||
|
||||
@ -938,7 +938,7 @@ static ssize_t ft5x06_read(FAR struct file *filep, FAR char *buffer,
|
||||
/* 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;
|
||||
}
|
||||
|
||||
@ -1001,7 +1001,7 @@ static int ft5x06_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;
|
||||
}
|
||||
|
||||
@ -1062,7 +1062,7 @@ static int ft5x06_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;
|
||||
}
|
||||
|
||||
|
@ -395,7 +395,7 @@ static int max11802_waitsample(FAR struct max11802_dev_s *priv,
|
||||
*/
|
||||
|
||||
ierr("ERROR: nxsem_wait: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
goto errout;
|
||||
}
|
||||
}
|
||||
@ -773,7 +773,7 @@ static int max11802_open(FAR struct file *filep)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -830,7 +830,7 @@ static int max11802_close(FAR struct file *filep)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -892,7 +892,7 @@ static ssize_t max11802_read(FAR struct file *filep, FAR char *buffer,
|
||||
/* This should only happen if the wait was cancelled by an signal */
|
||||
|
||||
ierr("ERROR: nxsem_wait: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1004,7 +1004,7 @@ static int max11802_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1064,7 +1064,7 @@ static int max11802_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -718,7 +718,7 @@ static inline int mxt_waitsample(FAR struct mxt_dev_s *priv)
|
||||
* the failure now.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
goto errout;
|
||||
}
|
||||
}
|
||||
@ -1148,7 +1148,7 @@ static int mxt_open(FAR struct file *filep)
|
||||
{
|
||||
/* This should only happen if the wait was cancelled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1229,7 +1229,7 @@ static int mxt_close(FAR struct file *filep)
|
||||
{
|
||||
/* This should only happen if the wait was cancelled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1300,7 +1300,7 @@ static ssize_t mxt_read(FAR struct file *filep, FAR char *buffer, size_t len)
|
||||
{
|
||||
/* This should only happen if the wait was cancelled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1522,7 +1522,7 @@ static int mxt_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
/* This should only happen if the wait was cancelled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1583,7 +1583,7 @@ static int mxt_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
{
|
||||
/* This should only happen if the wait was cancelled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ static inline int stmpe811_waitsample(FAR struct stmpe811_dev_s *priv,
|
||||
*/
|
||||
|
||||
ierr("ERROR: nxsem_wait failed: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
goto errout;
|
||||
}
|
||||
}
|
||||
@ -365,7 +365,7 @@ static int stmpe811_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;
|
||||
}
|
||||
|
||||
@ -425,7 +425,7 @@ static int stmpe811_close(FAR struct file *filep)
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
ierr("ERROR: nxsem_wait failed: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -488,7 +488,7 @@ static ssize_t stmpe811_read(FAR struct file *filep, FAR char *buffer, size_t le
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
ierr("ERROR: nxsem_wait failed: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -603,7 +603,7 @@ static int stmpe811_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
ierr("ERROR: nxsem_wait failed: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -668,7 +668,7 @@ static int stmpe811_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
ierr("ERROR: nxsem_wait failed: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -908,7 +908,7 @@ int stmpe811_register(STMPE811_HANDLE handle, int minor)
|
||||
if (ret < 0)
|
||||
{
|
||||
ierr("ERROR: nxsem_wait failed: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ static int rgbled_open(FAR struct file *filep)
|
||||
if (ret < 0)
|
||||
{
|
||||
lcderr("ERROR: nxsem_wait failed: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -191,7 +191,7 @@ static int rgbled_close(FAR struct file *filep)
|
||||
if (ret < 0)
|
||||
{
|
||||
lcderr("ERROR: nxsem_wait failed: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
|
@ -984,7 +984,7 @@ static int mtdconfig_open(FAR struct file *filep)
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: nxsem_wait failed: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
|
@ -510,7 +510,7 @@ static int telnet_open(FAR struct file *filep)
|
||||
if (ret < 0)
|
||||
{
|
||||
nerr("ERROR: nxsem_wait failed: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -559,7 +559,7 @@ static int telnet_close(FAR struct file *filep)
|
||||
if (ret < 0)
|
||||
{
|
||||
nerr("ERROR: nxsem_wait failed: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ static ssize_t adxl345_read(FAR struct file *filep, FAR char *buffer, size_t len
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -210,7 +210,7 @@ int adxl345_register(ADXL345_HANDLE handle, int minor)
|
||||
if (ret < 0)
|
||||
{
|
||||
snerr("ERROR: nxsem_wait failed: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ static void bmg160_read_measurement_data(FAR struct bmg160_dev_s *dev)
|
||||
if (ret < 0)
|
||||
{
|
||||
snerr("ERROR: Could not aquire dev->datasem: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -462,7 +462,7 @@ static ssize_t bmg160_read(FAR struct file *filep, FAR char *buffer,
|
||||
if (ret < 0)
|
||||
{
|
||||
snerr("ERROR: Could not aquire priv->datasem: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -511,7 +511,7 @@ static ssize_t l3gd20_read(FAR struct file *filep, FAR char *buffer,
|
||||
if (ret < 0)
|
||||
{
|
||||
snerr("ERROR: Could not aquire priv->datasem: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ static ssize_t xen1210_read(FAR struct file *filep, FAR char *buffer,
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
snerr("Failed: Cannot get exclusive access to driver structure!\n");
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ static int uart_takesem(FAR sem_t *sem, bool errout)
|
||||
* awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
|
||||
/* When the signal is received, should we errout? Or should we just
|
||||
* continue waiting until we have the semaphore?
|
||||
|
@ -147,7 +147,7 @@ static int spidrvr_open(FAR struct file *filep)
|
||||
ret = nxsem_wait(&priv->exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -185,7 +185,7 @@ static int spidrvr_close(FAR struct file *filep)
|
||||
ret = nxsem_wait(&priv->exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -256,7 +256,7 @@ static int spidrvr_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
ret = nxsem_wait(&priv->exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -312,7 +312,7 @@ static int spidrvr_unlink(FAR struct inode *inode)
|
||||
ret = nxsem_wait(&priv->exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1393,7 +1393,7 @@ static int usbhost_waitsample(FAR struct usbhost_state_s *priv,
|
||||
*/
|
||||
|
||||
ierr("ERROR: nxsem_wait: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
|
@ -1005,7 +1005,7 @@ static int usbhost_waitsample(FAR struct usbhost_state_s *priv,
|
||||
*/
|
||||
|
||||
ierr("ERROR: nxsem_wait: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
|
@ -1286,7 +1286,7 @@ static ssize_t cc3000_write(FAR struct file *filep, FAR const char *usrbuffer, s
|
||||
|
||||
cc3000_deselect_and_unlock(priv->spi);
|
||||
ninfo("nxsem_wait: %d\n", ret);
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
nwritten = ret;
|
||||
goto errout_without_sem;
|
||||
}
|
||||
|
@ -1267,7 +1267,7 @@ int xbee_atquery(FAR struct xbee_priv_s *priv, FAR const char *atcommand)
|
||||
ret = nxsem_wait(&priv->atquery_sem);
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1298,7 +1298,7 @@ int xbee_atquery(FAR struct xbee_priv_s *priv, FAR const char *atcommand)
|
||||
ret = nxsem_wait(&priv->atresp_sem);
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
wd_cancel(priv->atquery_wd);
|
||||
priv->querycmd[0] = 0;
|
||||
priv->querycmd[1] = 0;
|
||||
|
@ -1114,7 +1114,7 @@ static int xbeenet_ioctl(FAR struct net_driver_s *dev, int cmd,
|
||||
ret = nxsem_wait(&priv->xd_eventsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
priv->xd_eventpending = false;
|
||||
return ret;
|
||||
}
|
||||
|
@ -974,7 +974,7 @@ static int nrf24l01_open(FAR struct file *filep)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1021,7 +1021,7 @@ static int nrf24l01_close(FAR struct file *filep)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1057,7 +1057,7 @@ static ssize_t nrf24l01_read(FAR struct file *filep, FAR char *buffer,
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1089,7 +1089,7 @@ static ssize_t nrf24l01_write(FAR struct file *filep, FAR const char *buffer,
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1123,7 +1123,7 @@ static int nrf24l01_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1368,7 +1368,7 @@ static int nrf24l01_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -2041,7 +2041,7 @@ ssize_t nrf24l01_recv(struct nrf24l01_dev_s *dev, uint8_t *buffer,
|
||||
{
|
||||
/* This should only happen if the wait was canceled by an signal */
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -254,7 +254,7 @@ static int unionfs_semtake(FAR struct unionfs_inode_s *ui, bool noint)
|
||||
ret = nxsem_wait(&ui->ui_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
if (!noint)
|
||||
{
|
||||
return ret;
|
||||
|
@ -103,7 +103,7 @@ void nxterm_redraw(NXTERM handle, FAR const struct nxgl_rect_s *rect, bool more)
|
||||
* was interrupted by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(errno == EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
}
|
||||
while (ret < 0);
|
||||
|
@ -80,7 +80,7 @@ static void apb_semtake(FAR struct ap_buffer_s *apb)
|
||||
* the wait was awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(_SEM_ERRNO(ret) == EINTR);
|
||||
DEBUGASSERT(_SEM_ERRNO(ret) == EINTR || _SEM_ERRNO(ret) == ECANCELED);
|
||||
UNUSED(ret);
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ void lib_take_semaphore(FAR struct file_struct *stream)
|
||||
* was awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(_SEM_ERRNO(ret) == EINTR);
|
||||
DEBUGASSERT(_SEM_ERRNO(ret) == EINTR || _SEM_ERRNO(ret) == ECANCELED);
|
||||
UNUSED(ret);
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ void stream_semtake(FAR struct streamlist *list)
|
||||
* the wait was awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(_SEM_ERRNO(ret) == EINTR);
|
||||
DEBUGASSERT(_SEM_ERRNO(ret) == EINTR || _SEM_ERRNO(ret) == ECANCELED);
|
||||
UNUSED(ret);
|
||||
}
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ void modlib_registry_lock(void)
|
||||
* the wait was awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(_SEM_ERRNO(ret) == EINTR);
|
||||
DEBUGASSERT(_SEM_ERRNO(ret) == EINTR || _SEM_ERRNO(ret) == ECANCELED);
|
||||
UNUSED(ret);
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ void dns_semtake(void)
|
||||
if (ret < 0)
|
||||
{
|
||||
errcode = _SEM_ERRNO(ret);
|
||||
DEBUGASSERT(errcode == EINTR);
|
||||
DEBUGASSERT(errcode == EINTR || errcode == ECANCELED);
|
||||
}
|
||||
}
|
||||
while (ret < 0 && errcode == EINTR);
|
||||
|
@ -155,7 +155,7 @@ static void get_base62(FAR uint8_t *ptr)
|
||||
|
||||
while ((ret = _SEM_WAIT(&g_b62sem)) < 0)
|
||||
{
|
||||
DEBUGASSERT(_SEM_ERRNO(ret) == EINTR);
|
||||
DEBUGASSERT(_SEM_ERRNO(ret) == EINTR || _SEM_ERRNO(ret) == ECANCELED);
|
||||
}
|
||||
|
||||
memcpy(ptr, g_base62, MAX_XS);
|
||||
@ -294,4 +294,3 @@ int mkstemp(FAR char *path_template)
|
||||
}
|
||||
|
||||
#endif /* CONFIG_FS_WRITABLE */
|
||||
|
||||
|
@ -77,7 +77,7 @@ int work_lock(void)
|
||||
ret = sem_wait(&g_usrsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGASSERT(errno == EINTR);
|
||||
DEBUGASSERT(errno == EINTR || errno == ECANCELED);
|
||||
return -EINTR;
|
||||
}
|
||||
#else
|
||||
|
@ -66,7 +66,7 @@ void nxmu_semtake(sem_t *sem)
|
||||
* awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(_SEM_ERRNO(ret) == EINTR);
|
||||
DEBUGASSERT(_SEM_ERRNO(ret) == EINTR || _SEM_ERRNO(ret) == ECANCELED);
|
||||
UNUSED(ret);
|
||||
}
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ void gran_enter_critical(FAR struct gran_s *priv)
|
||||
ret = nxsem_wait(&priv->exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
}
|
||||
while (ret == -EINTR);
|
||||
@ -101,5 +101,3 @@ void gran_leave_critical(FAR struct gran_s *priv)
|
||||
|
||||
|
||||
#endif /* CONFIG_GRAN */
|
||||
|
||||
|
||||
|
@ -198,10 +198,10 @@ void mm_takesemaphore(FAR struct mm_heap_s *heap)
|
||||
if (ret < 0)
|
||||
{
|
||||
#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
#else
|
||||
int errcode = get_errno();
|
||||
DEBUGASSERT(errcode == EINTR);
|
||||
DEBUGASSERT(errcode == EINTR || errcode == ECANCELED);
|
||||
ret = -errcode;
|
||||
#endif
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ void icmp_free(FAR struct icmp_conn_s *conn)
|
||||
* the wait was awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
|
||||
UNUSED(ret);
|
||||
|
@ -170,7 +170,7 @@ void icmpv6_free(FAR struct icmpv6_conn_s *conn)
|
||||
* the wait was awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
|
||||
UNUSED(ret);
|
||||
|
@ -113,7 +113,7 @@ void igmp_waitmsg(FAR struct igmp_group_s *group, uint8_t msgid)
|
||||
* the wait is awakened by a signal.
|
||||
*/
|
||||
|
||||
ASSERT(ret == -EINTR);
|
||||
ASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
|
||||
UNUSED(ret);
|
||||
|
@ -73,7 +73,7 @@ static int local_waitlisten(FAR struct local_conn_s *server)
|
||||
ret = nxsem_wait(&server->lc_waitsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ static inline void _pkt_semtake(sem_t *sem)
|
||||
* the wait was awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
|
||||
UNUSED(ret);
|
||||
|
@ -69,7 +69,7 @@ static void _net_semtake(FAR struct socketlist *list)
|
||||
* the wait was awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
|
||||
UNUSED(ret);
|
||||
|
@ -118,7 +118,7 @@ static inline void _udp_semtake(FAR sem_t *sem)
|
||||
* the wait was awakened by a signal.
|
||||
*/
|
||||
|
||||
ASSERT(ret == -EINTR);
|
||||
ASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
|
||||
UNUSED(ret);
|
||||
|
@ -204,7 +204,7 @@ int usrsock_bind(FAR struct socket *psock,
|
||||
|
||||
while ((ret = net_lockedwait(&state.recvsem)) < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
|
||||
ret = state.result;
|
||||
|
@ -175,7 +175,7 @@ int usrsock_close(FAR struct usrsock_conn_s *conn)
|
||||
|
||||
while ((ret = net_lockedwait(&state.recvsem)) < OK)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
|
||||
ret = state.result;
|
||||
|
@ -95,7 +95,7 @@ static void _usrsock_semtake(FAR sem_t *sem)
|
||||
* the wait was awakened by a signal.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ int usrsock_connect(FAR struct socket *psock,
|
||||
ret = net_lockedwait(&state.recvsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
|
||||
/* Wait interrupted, exit early. */
|
||||
|
||||
|
@ -1215,7 +1215,7 @@ int usrsockdev_do_request(FAR struct usrsock_conn_s *conn,
|
||||
|
||||
while ((ret = net_lockedwait(&dev->req.sem)) < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
|
||||
if (usrsockdev_is_opened(dev))
|
||||
@ -1234,7 +1234,7 @@ int usrsockdev_do_request(FAR struct usrsock_conn_s *conn,
|
||||
|
||||
while ((ret = net_lockedwait(&dev->req.acksem)) < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -235,7 +235,7 @@ int usrsock_getsockname(FAR struct socket *psock,
|
||||
|
||||
while ((ret = net_lockedwait(&state.reqstate.recvsem)) < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
|
||||
ret = state.reqstate.result;
|
||||
|
@ -246,7 +246,7 @@ int usrsock_getsockopt(FAR struct usrsock_conn_s *conn, int level, int option,
|
||||
|
||||
while ((ret = net_lockedwait(&state.reqstate.recvsem)) < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
|
||||
ret = state.reqstate.result;
|
||||
|
@ -444,7 +444,7 @@ ssize_t usrsock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len,
|
||||
|
||||
while ((ret = net_lockedwait(&state.reqstate.recvsem)) < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
|
||||
ret = state.reqstate.result;
|
||||
|
@ -400,7 +400,7 @@ ssize_t usrsock_sendto(FAR struct socket *psock, FAR const void *buf,
|
||||
|
||||
while ((ret = net_lockedwait(&state.recvsem)) < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
|
||||
ret = state.result;
|
||||
|
@ -212,7 +212,7 @@ int usrsock_setsockopt(FAR struct usrsock_conn_s *conn, int level, int option,
|
||||
|
||||
while ((ret = net_lockedwait(&state.recvsem)) < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
|
||||
ret = state.result;
|
||||
|
@ -233,7 +233,7 @@ int usrsock_socket(int domain, int type, int protocol, FAR struct socket *psock)
|
||||
|
||||
while ((ret = net_lockedwait(&state.recvsem)) < 0)
|
||||
{
|
||||
DEBUGASSERT(ret == -EINTR);
|
||||
DEBUGASSERT(ret == -EINTR || ret == -ECANCELED);
|
||||
}
|
||||
|
||||
if (state.result < 0)
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user