Forward declare __sev(), __wfe(), __wfi() (#2658)
Some checks failed
Bazel presubmit checks / bazel-build-check (macos-latest) (push) Has been cancelled
Bazel presubmit checks / bazel-build-check (ubuntu-latest) (push) Has been cancelled
Bazel presubmit checks / other-bazel-checks (push) Has been cancelled
Check Configs / check-configs (push) Has been cancelled
CMake / build (push) Has been cancelled
Build on macOS / build (push) Has been cancelled
Build on Windows / build (push) Has been cancelled

If the compiler in use offers __sev(), __wfe(), or __wfi(), forward
declare them to be sure they're available for use.
This commit is contained in:
armandomontanez 2025-09-15 11:14:08 -07:00 committed by GitHub
parent 6b395cce04
commit 8fcd44a171
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -94,6 +94,9 @@ __force_inline static void __sev(void) {
pico_default_asm_volatile ("sev");
#endif
}
#else
// Forward declare so we don't have to #include <arm_acle.h>.
void __sev(void);
#endif
/*! \brief Insert a WFE instruction in to the code path.
@ -110,6 +113,9 @@ __force_inline static void __wfe(void) {
pico_default_asm_volatile ("wfe");
#endif
}
#else
// Forward declare so we don't have to #include <arm_acle.h>.
void __wfe(void);
#endif
/*! \brief Insert a WFI instruction in to the code path.
@ -121,6 +127,9 @@ __force_inline static void __wfe(void) {
__force_inline static void __wfi(void) {
pico_default_asm_volatile("wfi");
}
#else
// Forward declare so we don't have to #include <arm_acle.h>.
void __wfi(void);
#endif
/*! \brief Insert a DMB instruction in to the code path.