Skip to content

Commit

Permalink
pthread: We should not directly include arch/spinlock.h as it may cau…
Browse files Browse the repository at this point in the history
…se compilation errors in C++.

Instead, we should use nuttx/spinlock.h.

Signed-off-by: hujun5 <[email protected]>
  • Loading branch information
hujun260 committed Oct 12, 2024
1 parent 4c1c051 commit efa699c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion include/nuttx/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

#include <nuttx/compiler.h>
#include <nuttx/irq.h>
#include <nuttx/arch.h>

#if defined(CONFIG_TICKET_SPINLOCK) || defined(CONFIG_RW_SPINLOCK)
# include <nuttx/atomic.h>
Expand Down
2 changes: 1 addition & 1 deletion include/pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
* SP_LOCKED and SP_UNLOCKED must constants of type spinlock_t.
*/

# include <arch/spinlock.h>
# include <nuttx/spinlock.h>
#endif

/****************************************************************************
Expand Down

0 comments on commit efa699c

Please sign in to comment.