Fix a logic error in last change to sem_tickwait()

This commit is contained in:
Gregory Nutt 2015-08-01 16:00:23 -06:00
parent ffec6124f2
commit 3a109315ed
2 changed files with 3 additions and 2 deletions

2
arch

@ -1 +1 @@
Subproject commit d99e8ced38440ef61bebfd1507269b9072aba355
Subproject commit 098a35f7dd39b6e4546e2b490f18f7d71a338e23

View File

@ -138,7 +138,8 @@ int sem_tickwait(FAR sem_t *sem, uint32_t start, uint32_t delay)
elapsed = clock_systimer() - start;
if (elapsed >= (UINT32_MAX / 2) || elapsed >= delay)
{
return -ETIMEDOUT;
ret = -ETIMEDOUT;
goto errout_with_irqdisabled;
}
delay -= elapsed;