From 4aef71b9f6b9f3eeed29f614c0de1074f887a03b Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Tue, 25 Oct 2016 12:45:05 -0500 Subject: [PATCH] unified: Finish adding thread monitoring support Existing code wasn't removing a thread from the kernel's list of active threads if the thread terminated or aborted. (It did remove it if the delayed starting of a thread was cancelled.) Change-Id: Icc97917e33765696480d0e9bf31e882ef555d095 Signed-off-by: Allan Stephens --- arch/arm/core/thread_abort.c | 1 + kernel/unified/thread_abort.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/core/thread_abort.c b/arch/arm/core/thread_abort.c index 9fe8314caa5..378f3c38e7c 100644 --- a/arch/arm/core/thread_abort.c +++ b/arch/arm/core/thread_abort.c @@ -42,6 +42,7 @@ void k_thread_abort(k_tid_t thread) key = irq_lock(); _k_thread_single_abort(thread); + _thread_monitor_exit(thread); if (_current == thread) { if (_ScbIsInThreadMode()) { diff --git a/kernel/unified/thread_abort.c b/kernel/unified/thread_abort.c index ebe93ab4324..deceafc2d21 100644 --- a/kernel/unified/thread_abort.c +++ b/kernel/unified/thread_abort.c @@ -39,6 +39,7 @@ void k_thread_abort(k_tid_t thread) key = irq_lock(); _k_thread_single_abort(thread); + _thread_monitor_exit(thread); if (_current == thread) { _Swap(key);