From f326f15b401d3febadd57413032f3b146a2a2489 Mon Sep 17 00:00:00 2001 From: yinshengkai Date: Mon, 24 Jun 2024 19:38:13 +0800 Subject: [PATCH] sched: move DUMP_ON_EXIT to sched Signed-off-by: yinshengkai --- arch/Kconfig | 6 ------ include/nuttx/sched.h | 4 ++-- sched/Kconfig | 6 ++++++ sched/sched/CMakeLists.txt | 2 +- sched/sched/Make.defs | 2 +- sched/sched/sched_dumponexit.c | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 43475fea6a..2ec252ecae 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -1046,12 +1046,6 @@ config ARCH_STACKDUMP_MAX_LENGTH depends on ARCH_STACKDUMP default 0 -config DUMP_ON_EXIT - bool "Dump all tasks state on exit" - default n - ---help--- - Dump all tasks state on exit() - config ARCH_USBDUMP bool "Dump USB trace data" default n diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h index a6496af2f2..ba4b865aaa 100644 --- a/include/nuttx/sched.h +++ b/include/nuttx/sched.h @@ -1642,11 +1642,11 @@ size_t nxsched_collect_deadlock(FAR pid_t *pid, size_t count); * ****************************************************************************/ -#ifdef CONFIG_DUMP_ON_EXIT +#ifdef CONFIG_SCHED_DUMP_ON_EXIT void nxsched_dumponexit(void); #else # define nxsched_dumponexit() -#endif /* CONFIG_DUMP_ON_EXIT */ +#endif /* CONFIG_SCHED_DUMP_ON_EXIT */ #ifdef CONFIG_SMP /**************************************************************************** diff --git a/sched/Kconfig b/sched/Kconfig index 35c74bf33a..4fc7613194 100644 --- a/sched/Kconfig +++ b/sched/Kconfig @@ -793,6 +793,12 @@ config SCHED_DUMP_LEAK are printed using syslog. This helps catch any memory allocated by the task that remains unreleased when the task exits. +config SCHED_DUMP_ON_EXIT + bool "Dump all tasks state on exit" + default n + ---help--- + Dump all tasks state on exit() + config SCHED_USER_IDENTITY bool "Support per-task User Identity" default n diff --git a/sched/sched/CMakeLists.txt b/sched/sched/CMakeLists.txt index da39f4327e..ca4ad08b03 100644 --- a/sched/sched/CMakeLists.txt +++ b/sched/sched/CMakeLists.txt @@ -118,7 +118,7 @@ if(CONFIG_SCHED_BACKTRACE) list(APPEND SRCS sched_backtrace.c) endif() -if(CONFIG_DUMP_ON_EXIT) +if(CONFIG_SCHED_DUMP_ON_EXIT) list(APPEND SRCS sched_dumponexit.c) endif() diff --git a/sched/sched/Make.defs b/sched/sched/Make.defs index 61c9e6f8e5..1103128bc9 100644 --- a/sched/sched/Make.defs +++ b/sched/sched/Make.defs @@ -94,7 +94,7 @@ ifeq ($(CONFIG_SCHED_BACKTRACE),y) CSRCS += sched_backtrace.c endif -ifeq ($(CONFIG_DUMP_ON_EXIT),y) +ifeq ($(CONFIG_SCHED_DUMP_ON_EXIT),y) CSRCS += sched_dumponexit.c endif diff --git a/sched/sched/sched_dumponexit.c b/sched/sched/sched_dumponexit.c index b8ff20524c..2fde136e33 100644 --- a/sched/sched/sched_dumponexit.c +++ b/sched/sched/sched_dumponexit.c @@ -35,7 +35,7 @@ * Pre-processor Definitions ****************************************************************************/ -#ifdef CONFIG_DUMP_ON_EXIT +#ifdef CONFIG_SCHED_DUMP_ON_EXIT /**************************************************************************** * Private Functions @@ -84,4 +84,4 @@ void nxsched_dumponexit(void) nxsched_foreach(dumphandler, NULL); } -#endif /* CONFIG_DUMP_ON_EXIT */ +#endif /* CONFIG_SCHED_DUMP_ON_EXIT */