fix compile error

Error: /github/workspace/sources/nuttx/include/nuttx/spinlock_type.h:57:3: error: unknown type name 'atomic_t'
368   57 |   atomic_t owner;
369      |   ^~~~~~~~
370Error: /github/workspace/sources/nuttx/include/nuttx/spinlock_type.h:58:3: error: unknown type name 'atomic_t'
371   58 |   atomic_t next;
372      |   ^~~~~~~~

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5 2025-01-07 22:01:08 +08:00 committed by Xiang Xiao
parent 9d5ecc29d0
commit fabf4a5142
2 changed files with 5 additions and 0 deletions

View file

@ -32,6 +32,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/rpmsg/rpmsg.h>
#include <nuttx/mutex.h>
#include <nuttx/spinlock.h>
#include <nuttx/timers/rpmsg_rtc.h>
#include <nuttx/timers/arch_rtc.h>

View file

@ -29,6 +29,10 @@
#include <nuttx/config.h>
#if defined(CONFIG_RW_SPINLOCK) || defined(CONFIG_TICKET_SPINLOCK)
#include <nuttx/atomic.h>
#endif
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"