From 2f9718338e9a00c74153054f02f06b7179462e39 Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Thu, 7 May 2015 09:44:35 -0400 Subject: [PATCH] Relocate arch-independent _TaskAbort() Moves the architecture-independent microkernel's handler for fatal task errors into the file containing other abort-related routines, since it doesn't have anything to do with the microkernel server code it previously resided with. Change-Id: I284eb05339cdff955f02018edfd0e53619b283b4 Signed-off-by: Allan Stephens --- kernel/microkernel/k_task.c | 27 +++++++++++++++++++++++++++ kernel/microkernel/server.c | 27 --------------------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/kernel/microkernel/k_task.c b/kernel/microkernel/k_task.c index 3c27576a45e..eb23d32dbd8 100644 --- a/kernel/microkernel/k_task.c +++ b/kernel/microkernel/k_task.c @@ -256,6 +256,33 @@ void abort_task(struct k_proc *X) } } +#ifndef CONFIG_ARCH_HAS_TASK_ABORT +/******************************************************************************* +* +* _TaskAbort - microkernel handler for fatal task errors +* +* To be invoked when a task aborts implicitly, either by returning from its +* entry point or due to a software or hardware fault. +* +* RETURNS: does not return +* +* \NOMANUAL +*/ + +FUNC_NORETURN void _TaskAbort(void) +{ + _task_ioctl(_k_current_task->Ident, TASK_ABORT); + + /* + * Compiler can't tell that _task_ioctl() won't return and issues + * a warning unless we explicitly tell it that control never gets this + * far. + */ + + CODE_UNREACHABLE; +} +#endif + /******************************************************************************* * * task_abort_handler_set - install an abort handler diff --git a/kernel/microkernel/server.c b/kernel/microkernel/server.c index 20dcb335777..ae4ded1966c 100644 --- a/kernel/microkernel/server.c +++ b/kernel/microkernel/server.c @@ -226,30 +226,3 @@ void *_Cget(struct nano_lifo *chan) return element; } - -#ifndef CONFIG_ARCH_HAS_TASK_ABORT -/******************************************************************************* -* -* _TaskAbort - microkernel handler for fatal task errors -* -* To be invoked when a task aborts implicitly, either by returning from its -* entry point or due to a software or hardware fault. -* -* RETURNS: does not return -* -* \NOMANUAL -*/ - -FUNC_NORETURN void _TaskAbort(void) -{ - _task_ioctl(_k_current_task->Ident, TASK_ABORT); - - /* - * Compiler can't tell that _task_ioctl() won't return and issues - * a warning unless we explicitly tell it that control never gets this - * far. - */ - - CODE_UNREACHABLE; -} -#endif