xiaoxiang781216 commented on code in PR #7649: URL: https://github.com/apache/incubator-nuttx/pull/7649#discussion_r1029104512
########## libs/libc/machine/arch_atomic.c: ########## @@ -733,3 +733,26 @@ SYNC_VAL_CMP_SWAP(4, uint32_t) SYNC_VAL_CMP_SWAP(8, uint64_t) #endif /* __clang__ */ + +/**************************************************************************** + * Name: up_testset + ****************************************************************************/ + +#if defined(CONFIG_SPINLOCK) && !defined(CONFIG_ARCH_HAVE_TESTSET) +spinlock_t up_testset(volatile FAR spinlock_t *lock) +{ + irqstate_t flags; + spinlock_t ret; + + flags = spin_lock_irqsave(NULL); Review Comment: This call chain only happen in SMP case, but SMP require arch provide up_testset implement(ARCH_HAVE_TESTSET): https://github.com/apache/incubator-nuttx/blob/master/sched/Kconfig#L275 so, the implementation in here is only used for single core. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org