From 97e16fb779a41c45dc70c4b8c21070a644ba6f7c Mon Sep 17 00:00:00 2001 From: hujun5 Date: Mon, 29 Apr 2024 10:41:17 +0800 Subject: [PATCH] pthread: We should not directly include arch/spinlock.h as it may cause compilation errors in C++. Instead, we should use nuttx/spinlock.h. Signed-off-by: hujun5 --- include/nuttx/spinlock.h | 1 - include/pthread.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/nuttx/spinlock.h b/include/nuttx/spinlock.h index 8ead10d7765fd..e484c233c07b6 100644 --- a/include/nuttx/spinlock.h +++ b/include/nuttx/spinlock.h @@ -35,7 +35,6 @@ #include #include -#include #if defined(CONFIG_TICKET_SPINLOCK) || defined(CONFIG_RW_SPINLOCK) # include diff --git a/include/pthread.h b/include/pthread.h index 0418dfacd0726..97eca7a5368ed 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -49,7 +49,7 @@ * SP_LOCKED and SP_UNLOCKED must constants of type spinlock_t. */ -# include +# include #endif /****************************************************************************