From ffc1da08f9ab3a05657330dc551adc7020801833 Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Wed, 2 Sep 2020 08:14:09 -0700 Subject: [PATCH] kernel: add z_thread_single_abort to private hdr We shouldn't be copy-pasting extern declarations like this. Signed-off-by: Andrew Boie --- arch/arm/core/aarch32/cortex_m/thread_abort.c | 2 -- arch/posix/core/posix_core.c | 3 --- kernel/include/ksched.h | 1 + kernel/thread_abort.c | 2 -- 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/arm/core/aarch32/cortex_m/thread_abort.c b/arch/arm/core/aarch32/cortex_m/thread_abort.c index 7c8ccd18aec..f2f4c8c30db 100644 --- a/arch/arm/core/aarch32/cortex_m/thread_abort.c +++ b/arch/arm/core/aarch32/cortex_m/thread_abort.c @@ -24,8 +24,6 @@ #include #include -extern void z_thread_single_abort(struct k_thread *thread); - void z_impl_k_thread_abort(k_tid_t thread) { z_thread_single_abort(thread); diff --git a/arch/posix/core/posix_core.c b/arch/posix/core/posix_core.c index dfb71b59df8..81da069a542 100644 --- a/arch/posix/core/posix_core.c +++ b/arch/posix/core/posix_core.c @@ -477,9 +477,6 @@ void posix_abort_thread(int thread_idx) #if defined(CONFIG_ARCH_HAS_THREAD_ABORT) - -extern void z_thread_single_abort(struct k_thread *thread); - void z_impl_k_thread_abort(k_tid_t thread) { unsigned int key; diff --git a/kernel/include/ksched.h b/kernel/include/ksched.h index e75ad4eff06..9b2b751fda4 100644 --- a/kernel/include/ksched.h +++ b/kernel/include/ksched.h @@ -63,6 +63,7 @@ void z_sched_abort(struct k_thread *thread); void z_sched_ipi(void); void z_sched_start(struct k_thread *thread); void z_ready_thread(struct k_thread *thread); +void z_thread_single_abort(struct k_thread *thread); static inline void z_pend_curr_unlocked(_wait_q_t *wait_q, k_timeout_t timeout) { diff --git a/kernel/thread_abort.c b/kernel/thread_abort.c index 561f0bee5f6..3b77c79ae28 100644 --- a/kernel/thread_abort.c +++ b/kernel/thread_abort.c @@ -22,8 +22,6 @@ #include #include -extern void z_thread_single_abort(struct k_thread *thread); - #if !defined(CONFIG_ARCH_HAS_THREAD_ABORT) void z_impl_k_thread_abort(k_tid_t thread) {