summaryrefslogtreecommitdiff
path: root/src/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread.c')
-rw-r--r--src/thread.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/thread.c b/src/thread.c
index 745e3f774f..0c4a645eac 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -162,6 +162,9 @@ static void _thread_timeout(void *parameter)
*/
RT_ASSERT(rt_sched_thread_is_suspended(thread));
+ /* The timeout callback now owns this thread timer. */
+ RT_SCHED_CTX(thread).sched_flag_ttmr_set = 0;
+
/* set error number */
thread->error = -RT_ETIMEOUT;