summaryrefslogtreecommitdiff
path: root/core/nds32/task.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/nds32/task.c')
-rw-r--r--core/nds32/task.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/nds32/task.c b/core/nds32/task.c
index dc83cba088..36f7849f2b 100644
--- a/core/nds32/task.c
+++ b/core/nds32/task.c
@@ -434,8 +434,11 @@ static uint32_t __wait_evt(int timeout_us, task_id_t resched)
__schedule(1, resched, 0);
resched = TASK_ID_IDLE;
}
- if (timeout_us > 0)
+ if (timeout_us > 0) {
timer_cancel(me);
+ /* Ensure timer event is clear, we no longer care about it */
+ atomic_clear(&tsk->events, TASK_EVENT_TIMER);
+ }
return evt;
}