From 3a109315edb95f858ad0d240e347c0e25be659bd Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 1 Aug 2015 16:00:23 -0600 Subject: [PATCH] Fix a logic error in last change to sem_tickwait() --- arch | 2 +- sched/semaphore/sem_tickwait.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch b/arch index d99e8ced38..098a35f7dd 160000 --- a/arch +++ b/arch @@ -1 +1 @@ -Subproject commit d99e8ced38440ef61bebfd1507269b9072aba355 +Subproject commit 098a35f7dd39b6e4546e2b490f18f7d71a338e23 diff --git a/sched/semaphore/sem_tickwait.c b/sched/semaphore/sem_tickwait.c index 8d742a1730..cfc768065b 100644 --- a/sched/semaphore/sem_tickwait.c +++ b/sched/semaphore/sem_tickwait.c @@ -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;