Skip to content

Commit 8fcd44a

Browse files
Forward declare __sev(), __wfe(), __wfi() (#2658)
If the compiler in use offers __sev(), __wfe(), or __wfi(), forward declare them to be sure they're available for use.
1 parent 6b395cc commit 8fcd44a

File tree

1 file changed

+9
-0
lines changed
  • src/rp2_common/hardware_sync/include/hardware

1 file changed

+9
-0
lines changed

src/rp2_common/hardware_sync/include/hardware/sync.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ __force_inline static void __sev(void) {
9494
pico_default_asm_volatile ("sev");
9595
#endif
9696
}
97+
#else
98+
// Forward declare so we don't have to #include <arm_acle.h>.
99+
void __sev(void);
97100
#endif
98101

99102
/*! \brief Insert a WFE instruction in to the code path.
@@ -110,6 +113,9 @@ __force_inline static void __wfe(void) {
110113
pico_default_asm_volatile ("wfe");
111114
#endif
112115
}
116+
#else
117+
// Forward declare so we don't have to #include <arm_acle.h>.
118+
void __wfe(void);
113119
#endif
114120

115121
/*! \brief Insert a WFI instruction in to the code path.
@@ -121,6 +127,9 @@ __force_inline static void __wfe(void) {
121127
__force_inline static void __wfi(void) {
122128
pico_default_asm_volatile("wfi");
123129
}
130+
#else
131+
// Forward declare so we don't have to #include <arm_acle.h>.
132+
void __wfi(void);
124133
#endif
125134

126135
/*! \brief Insert a DMB instruction in to the code path.

0 commit comments

Comments
 (0)