From dadbe105f2028d9c1333762621cda626000ee57d Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Tue, 12 Mar 2024 12:41:36 -0700 Subject: [PATCH] posix: tracing for custom thread abort func POSIX has a custom implementation for thread abort (z_impl_k_thread_abort) which lacks the tracing function calls as in the generic version. So add them. Signed-off-by: Daniel Leung --- arch/posix/core/thread.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/posix/core/thread.c b/arch/posix/core/thread.c index e1ebc6fbc80ffc..cc7fc355554473 100644 --- a/arch/posix/core/thread.c +++ b/arch/posix/core/thread.c @@ -20,6 +20,11 @@ #include "posix_core.h" #include +#ifdef CONFIG_TRACING +#include +#include +#endif + /* Note that in this arch we cheat quite a bit: we use as stack a normal * pthreads stack and therefore we ignore the stack size */ @@ -62,6 +67,8 @@ void z_impl_k_thread_abort(k_tid_t thread) unsigned int key; int thread_idx; + SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_thread, abort, thread); + posix_thread_status_t *tstatus = (posix_thread_status_t *) thread->callee_saved.thread_status; @@ -103,5 +110,7 @@ void z_impl_k_thread_abort(k_tid_t thread) /* The abort handler might have altered the ready queue. */ z_reschedule_irqlock(key); + + SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_thread, abort, thread); } #endif