xiaoxiang781216 commented on code in PR #11140: URL: https://github.com/apache/nuttx/pull/11140#discussion_r1390421482
########## include/nuttx/spinlock.h: ########## @@ -32,12 +32,12 @@ #include <nuttx/irq.h> -#ifdef CONFIG_RW_SPINLOCK -#include <stdatomic.h> +#if defined(CONFIG_RW_SPINLOCK) && !defined(__cplusplus) Review Comment: ``` #ifdef CONFIG_RW_SPINLOCK # ifdef __cplusplus # include <atomic.h> # else # include <stdatomic.h> # endif ``` ########## include/nuttx/spinlock.h: ########## @@ -500,7 +509,7 @@ void spin_unlock_irqrestore_wo_note(FAR spinlock_t *lock, irqstate_t flags); # define spin_unlock_irqrestore_wo_note(l, f) up_irq_restore(f) #endif -#ifdef CONFIG_RW_SPINLOCK +#if defined(CONFIG_RW_SPINLOCK) && !defined(__cplusplus) Review Comment: revert the change -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
