From e2626152801f1a0de955f8b63ef79c223645e996 Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Tue, 25 Oct 2016 08:54:28 -0500 Subject: [PATCH] unified: Remove k_thread_abort_handler() support The new kernel doesn't support the thread abort handler concept, so only the legacy API for this capability is needed. Change-Id: Ie809092e73b784504c3d298911d216bed8dd8993 Signed-off-by: Allan Stephens --- include/kernel.h | 1 - include/legacy.h | 2 +- kernel/unified/thread_abort.c | 4 +++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/kernel.h b/include/kernel.h index 7b01532a0b..e126da107f 100644 --- a/include/kernel.h +++ b/include/kernel.h @@ -250,7 +250,6 @@ extern void k_thread_priority_set(k_tid_t thread, int prio); extern void k_thread_suspend(k_tid_t thread); extern void k_thread_resume(k_tid_t thread); -extern void k_thread_abort_handler_set(void (*handler)(void)); extern void k_sched_time_slice_set(int32_t slice, int prio); diff --git a/include/legacy.h b/include/legacy.h index 6f1cc51cf9..f7fc636feb 100644 --- a/include/legacy.h +++ b/include/legacy.h @@ -156,7 +156,7 @@ extern void _legacy_sleep(int32_t ticks); #define task_priority_set(task, prio) k_thread_priority_set(task, (int)prio) #define task_entry_set(task, entry) \ k_thread_entry_set(task, (k_thread_entry_t)entry) -#define task_abort_handler_set k_thread_abort_handler_set +extern void task_abort_handler_set(void (*handler)(void)); /** * @brief Process an "offload" request diff --git a/kernel/unified/thread_abort.c b/kernel/unified/thread_abort.c index 5019404890..ebe93ab432 100644 --- a/kernel/unified/thread_abort.c +++ b/kernel/unified/thread_abort.c @@ -50,7 +50,9 @@ void k_thread_abort(k_tid_t thread) } #endif -void k_thread_abort_handler_set(void (*func)(void)) +/* legacy API */ + +void task_abort_handler_set(void (*func)(void)) { _current->fn_abort = func; }