mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-12-10 07:14:36 +01:00
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
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:
parent
6b395cce04
commit
8fcd44a171
1 changed files with 9 additions and 0 deletions
|
|
@ -94,6 +94,9 @@ __force_inline static void __sev(void) {
|
||||||
pico_default_asm_volatile ("sev");
|
pico_default_asm_volatile ("sev");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// Forward declare so we don't have to #include <arm_acle.h>.
|
||||||
|
void __sev(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*! \brief Insert a WFE instruction in to the code path.
|
/*! \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");
|
pico_default_asm_volatile ("wfe");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// Forward declare so we don't have to #include <arm_acle.h>.
|
||||||
|
void __wfe(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*! \brief Insert a WFI instruction in to the code path.
|
/*! \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) {
|
__force_inline static void __wfi(void) {
|
||||||
pico_default_asm_volatile("wfi");
|
pico_default_asm_volatile("wfi");
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// Forward declare so we don't have to #include <arm_acle.h>.
|
||||||
|
void __wfi(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*! \brief Insert a DMB instruction in to the code path.
|
/*! \brief Insert a DMB instruction in to the code path.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue