mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
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:
committed by
Gregory Nutt
parent
9e8332e5c8
commit
a8c58607e9
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user