From 9d9110defb14a5ebf6e5963d4e7cf27ec543fd4c Mon Sep 17 00:00:00 2001 From: guoshichao Date: Thu, 28 Nov 2024 16:01:31 +0800 Subject: [PATCH] nuttx/arch: select ARCH_HAVE_TESTSET if ARCH_HAVE_CUSTOM_TESTSET is on the include/nuttx/spinlock.h#up_testset() function is also controlled by ARCH_HAVE_TESTSET, so when ARCH_HAVE_CUSTOM_TESTSET is selected by boards, the include/nuttx/spinlock.h#up_testset() should also not be build, and using the board specific implementation. So in this case, if Option ARCH_HAVE_CUSTOM_TESTSET is enabled, it is assumed that Option ARCH_HAVE_TESTSET is also enabled. However, when Option ARCH_HAVE_TESTSET is enabled, it doesn't necessarily mean that Option ARCH_HAVE_CUSTOM_TESTSET is also enabled. In this way, it can be ensured that the implementation under the include/nuttx/spinlock.h#up_testset can also be controlled by Option ARCH_HAVE_CUSTOM_TESTSET. Signed-off-by: guoshichao --- arch/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/Kconfig b/arch/Kconfig index 4cd381d862..c3716be866 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -487,6 +487,7 @@ config ARCH_HAVE_TESTSET config ARCH_HAVE_CUSTOM_TESTSET bool default n + select ARCH_HAVE_TESTSET config ARCH_HAVE_THREAD_LOCAL bool