summaryrefslogtreecommitdiff
path: root/nuttx/sched
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/sched')
-rw-r--r--nuttx/sched/mqueue/mq_timedreceive.c2
-rw-r--r--nuttx/sched/mqueue/mq_timedsend.c2
-rw-r--r--nuttx/sched/semaphore/sem_timedwait.c6
3 files changed, 5 insertions, 5 deletions
diff --git a/nuttx/sched/mqueue/mq_timedreceive.c b/nuttx/sched/mqueue/mq_timedreceive.c
index ef9f0b6a5..858d9a3bf 100644
--- a/nuttx/sched/mqueue/mq_timedreceive.c
+++ b/nuttx/sched/mqueue/mq_timedreceive.c
@@ -198,7 +198,7 @@ ssize_t mq_timedreceive(mqd_t mqdes, FAR char *msg, size_t msglen,
return ERROR;
}
- if (!abstime || abstime->tv_sec < 0 || abstime->tv_nsec > 1000000000)
+ if (!abstime || abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
{
set_errno(EINVAL);
return ERROR;
diff --git a/nuttx/sched/mqueue/mq_timedsend.c b/nuttx/sched/mqueue/mq_timedsend.c
index a5aa11c84..e14495649 100644
--- a/nuttx/sched/mqueue/mq_timedsend.c
+++ b/nuttx/sched/mqueue/mq_timedsend.c
@@ -200,7 +200,7 @@ int mq_timedsend(mqd_t mqdes, FAR const char *msg, size_t msglen, int prio,
return ERROR;
}
- if (!abstime || abstime->tv_sec < 0 || abstime->tv_nsec > 1000000000)
+ if (!abstime || abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
{
set_errno(EINVAL);
return ERROR;
diff --git a/nuttx/sched/semaphore/sem_timedwait.c b/nuttx/sched/semaphore/sem_timedwait.c
index 1ac69e68b..b7d850728 100644
--- a/nuttx/sched/semaphore/sem_timedwait.c
+++ b/nuttx/sched/semaphore/sem_timedwait.c
@@ -147,7 +147,7 @@ static void sem_timeout(int argc, uint32_t pid)
* abstime - The absolute time to wait until a timeout is declared.
*
* Return Value:
- * One success, the length of the selected message in bytes.is
+ * One success, the length of the selected message in bytes is
* returned. On failure, -1 (ERROR) is returned and the errno
* is set appropriately:
*
@@ -198,7 +198,7 @@ int sem_timedwait(FAR sem_t *sem, FAR const struct timespec *abstime)
/* We will disable interrupts until we have completed the semaphore
* wait. We need to do this (as opposed to just disabling pre-emption)
- * because there could be interrupt handlers that are asynchronoulsy
+ * because there could be interrupt handlers that are asynchronously
* posting semaphores and to prevent race conditions with watchdog
* timeout. This is not too bad because interrupts will be re-
* enabled while we are blocked waiting for the semaphore.
@@ -223,7 +223,7 @@ int sem_timedwait(FAR sem_t *sem, FAR const struct timespec *abstime)
* with a valid timeout.
*/
- if (abstime->tv_sec < 0 || abstime->tv_nsec > 1000000000)
+ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
{
err = EINVAL;
goto errout_disabled;