Skip to content

Commit

Permalink
fix compile error
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
hujun260 authored and xiaoxiang781216 committed Jan 8, 2025
1 parent 9d5ecc2 commit fabf4a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/timers/rpmsg_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
4 changes: 4 additions & 0 deletions include/nuttx/spinlock_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit fabf4a5

Please sign in to comment.