mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-12-10 07:14:36 +01:00
fix return type of enable/disable interrupt methods... add host versions for completeness (#2310)
This commit is contained in:
parent
dd1f48335b
commit
b1676c18a3
3 changed files with 15 additions and 2 deletions
|
|
@ -121,6 +121,10 @@ void restore_interrupts(uint32_t status);
|
|||
|
||||
void restore_interrupts_from_disabled(uint32_t status);
|
||||
|
||||
void disable_interrupts(void);
|
||||
|
||||
void enable_interrupts(void);
|
||||
|
||||
uint spin_lock_get_num(spin_lock_t *lock);
|
||||
|
||||
spin_lock_t *spin_lock_instance(uint lock_num);
|
||||
|
|
|
|||
|
|
@ -31,6 +31,15 @@ PICO_WEAK_FUNCTION_DEF(restore_interrupts_from_disabled)
|
|||
void PICO_WEAK_FUNCTION_IMPL_NAME(restore_interrupts_from_disabled)(uint32_t status) {
|
||||
}
|
||||
|
||||
PICO_WEAK_FUNCTION_DEF(disable_interrupts)
|
||||
|
||||
void PICO_WEAK_FUNCTION_IMPL_NAME(disable_interrupts)(void) {
|
||||
}
|
||||
|
||||
PICO_WEAK_FUNCTION_DEF(enable_interrupts)
|
||||
|
||||
void PICO_WEAK_FUNCTION_IMPL_NAME(enable_interrupts)(void) {
|
||||
}
|
||||
|
||||
PICO_WEAK_FUNCTION_DEF(spin_lock_instance)
|
||||
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ __force_inline static void __mem_fence_release(void) {
|
|||
/*! \brief Explicitly disable interrupts on the calling core
|
||||
* \ingroup hardware_sync
|
||||
*/
|
||||
__force_inline static uint32_t disable_interrupts(void) {
|
||||
__force_inline static void disable_interrupts(void) {
|
||||
#ifdef __riscv
|
||||
__compiler_memory_barrier();
|
||||
riscv_clear_csr(mstatus, 8);
|
||||
|
|
@ -214,7 +214,7 @@ __force_inline static uint32_t disable_interrupts(void) {
|
|||
/*! \brief Explicitly enable interrupts on the calling core
|
||||
* \ingroup hardware_sync
|
||||
*/
|
||||
__force_inline static uint32_t enable_interrupts(void) {
|
||||
__force_inline static void enable_interrupts(void) {
|
||||
#ifdef __riscv
|
||||
__compiler_memory_barrier();
|
||||
riscv_set_csr(mstatus, 8);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue