mirror of
https://github.com/apache/nuttx.git
synced 2026-10-11 16:20:21 +00:00
arch/arm64: Add support to disable signals actions related data struct
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
This commit is contained in:
parent
0813357308
commit
d3f89c2661
5 changed files with 26 additions and 15 deletions
|
|
@ -259,6 +259,11 @@ extern "C"
|
|||
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifdef CONFIG_ENABLE_ALL_SIGNALS
|
||||
/* task context, for signal process */
|
||||
|
||||
uint64_t *saved_regs;
|
||||
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
/* This is the saved address to use when returning from a user-space
|
||||
* signal handler.
|
||||
|
|
@ -267,6 +272,7 @@ struct xcptcontext
|
|||
uintptr_t sigreturn;
|
||||
|
||||
#endif
|
||||
#endif /* CONFIG_ENABLE_ALL_SIGNALS */
|
||||
/* task stack reg context */
|
||||
|
||||
uint64_t *regs;
|
||||
|
|
@ -274,10 +280,6 @@ struct xcptcontext
|
|||
uint64_t *initregs;
|
||||
#endif
|
||||
|
||||
/* task context, for signal process */
|
||||
|
||||
uint64_t *saved_regs;
|
||||
|
||||
#ifdef CONFIG_ARCH_FPU
|
||||
uint64_t *fpu_regs;
|
||||
uint64_t *saved_fpu_regs;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ list(APPEND SRCS arm64_initialize.c arm64_initialstate.c arm64_boot.c)
|
|||
list(APPEND SRCS arm64_nputs.c arm64_createstack.c)
|
||||
list(APPEND SRCS arm64_releasestack.c arm64_stackframe.c arm64_usestack.c)
|
||||
list(APPEND SRCS arm64_exit.c arm64_fork.c)
|
||||
list(APPEND SRCS arm64_schedulesigaction.c arm64_sigdeliver.c)
|
||||
list(APPEND SRCS arm64_getintstack.c arm64_registerdump.c)
|
||||
list(APPEND SRCS arm64_perf.c arm64_tcbinfo.c)
|
||||
|
||||
|
|
@ -44,6 +43,10 @@ list(APPEND SRCS arm64_syscall.c)
|
|||
# Use common heap allocation for now (may need to be customized later)
|
||||
list(APPEND SRCS arm64_allocateheap.c)
|
||||
|
||||
if(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
list(APPEND SRCS arm64_schedulesigaction.c arm64_sigdeliver.c)
|
||||
endif()
|
||||
|
||||
if(NOT CONFIG_ARCH_IDLE_CUSTOM)
|
||||
list(APPEND SRCS arm64_idle.c)
|
||||
endif()
|
||||
|
|
@ -89,8 +92,10 @@ if(CONFIG_SMP)
|
|||
endif()
|
||||
|
||||
if(CONFIG_BUILD_KERNEL)
|
||||
list(APPEND SRCS arm64_task_start.c arm64_pthread_start.c
|
||||
arm64_signal_dispatch.c)
|
||||
list(APPEND SRCS arm64_task_start.c arm64_pthread_start.c)
|
||||
if(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
list(APPEND SRCS arm64_signal_dispatch.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_KERNEL_STACK)
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ CMN_CSRCS = arm64_initialize.c arm64_initialstate.c arm64_boot.c
|
|||
CMN_CSRCS += arm64_nputs.c arm64_createstack.c
|
||||
CMN_CSRCS += arm64_releasestack.c arm64_stackframe.c arm64_usestack.c
|
||||
CMN_CSRCS += arm64_exit.c arm64_fork.c
|
||||
CMN_CSRCS += arm64_schedulesigaction.c arm64_sigdeliver.c
|
||||
CMN_CSRCS += arm64_getintstack.c arm64_registerdump.c
|
||||
CMN_CSRCS += arm64_perf.c arm64_tcbinfo.c
|
||||
|
||||
|
|
@ -50,6 +49,10 @@ CMN_CSRCS += arm64_syscall.c
|
|||
CMN_CSRCS += arm64_modifyreg8.c arm64_modifyreg16.c arm64_modifyreg32.c
|
||||
CMN_CSRCS += arm64_hwdebug.c
|
||||
|
||||
ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y)
|
||||
CMN_CSRCS += arm64_schedulesigaction.c arm64_sigdeliver.c
|
||||
endif
|
||||
|
||||
# Use common heap allocation for now (may need to be customized later)
|
||||
CMN_CSRCS += arm64_allocateheap.c
|
||||
|
||||
|
|
@ -99,7 +102,10 @@ CMN_CSRCS += arm64_smpcall.c
|
|||
endif
|
||||
|
||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
||||
CMN_CSRCS += arm64_task_start.c arm64_pthread_start.c arm64_signal_dispatch.c
|
||||
CMN_CSRCS += arm64_task_start.c arm64_pthread_start.c
|
||||
ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y)
|
||||
CMN_CSRCS += arm64_signal_dispatch.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_KERNEL_STACK),y)
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include "arm64_internal.h"
|
||||
|
||||
#if !defined(CONFIG_BUILD_FLAT) && defined(__KERNEL__)
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
|
|
@ -75,4 +75,4 @@ void up_signal_dispatch(_sa_sigaction_t sighand, int signo,
|
|||
(uintptr_t)info, (uintptr_t)ucontext);
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_BUILD_FLAT && __KERNEL__ */
|
||||
#endif /* __KERNEL__ */
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ uint64_t *arm64_syscall(uint64_t *regs)
|
|||
restore_critical_section(tcb, cpu);
|
||||
break;
|
||||
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
#if defined(CONFIG_BUILD_KERNEL) && defined(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
/* R0=SYS_signal_handler: This a user signal handler callback
|
||||
*
|
||||
* void signal_handler(_sa_sigaction_t sighand, int signo,
|
||||
|
|
@ -285,9 +285,7 @@ uint64_t *arm64_syscall(uint64_t *regs)
|
|||
#endif
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
/* R0=SYS_signal_handler_return: This a user signal handler callback
|
||||
*
|
||||
* void signal_handler_return(void);
|
||||
|
|
@ -317,7 +315,7 @@ uint64_t *arm64_syscall(uint64_t *regs)
|
|||
#endif
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#endif /* CONFIG_BUILD_KERNEL && CONFIG_ENABLE_ALL_SIGNALS */
|
||||
|
||||
default:
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue