mirror of
https://github.com/micropython/micropython.git
synced 2025-12-15 17:30:14 +01:00
all: Rename the "NORETURN" macro to "MP_NORETURN".
Some checks failed
JavaScript code lint and formatting with Biome / eslint (push) Has been cancelled
Check code formatting / code-formatting (push) Has been cancelled
Check spelling with codespell / codespell (push) Has been cancelled
Build docs / build (push) Has been cancelled
Check examples / embedding (push) Has been cancelled
Package mpremote / build (push) Has been cancelled
.mpy file format and tools / test (push) Has been cancelled
Build ports metadata / build (push) Has been cancelled
alif port / build_alif (alif_ae3_build) (push) Has been cancelled
cc3200 port / build (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3) (push) Has been cancelled
esp8266 port / build (push) Has been cancelled
mimxrt port / build (push) Has been cancelled
nrf port / build (push) Has been cancelled
powerpc port / build (push) Has been cancelled
qemu port / build_and_test_arm (push) Has been cancelled
qemu port / build_and_test_rv32 (push) Has been cancelled
renesas-ra port / build_renesas_ra_board (push) Has been cancelled
rp2 port / build (push) Has been cancelled
samd port / build (push) Has been cancelled
stm32 port / build_stm32 (stm32_misc_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_nucleo_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_pyb_build) (push) Has been cancelled
unix port / minimal (push) Has been cancelled
unix port / reproducible (push) Has been cancelled
unix port / standard (push) Has been cancelled
unix port / standard_v2 (push) Has been cancelled
unix port / coverage (push) Has been cancelled
unix port / coverage_32bit (push) Has been cancelled
unix port / nanbox (push) Has been cancelled
unix port / float (push) Has been cancelled
unix port / stackless_clang (push) Has been cancelled
unix port / float_clang (push) Has been cancelled
unix port / settrace (push) Has been cancelled
unix port / settrace_stackless (push) Has been cancelled
unix port / macos (push) Has been cancelled
unix port / qemu_mips (push) Has been cancelled
unix port / qemu_arm (push) Has been cancelled
unix port / qemu_riscv64 (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, x64, windows-2022, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x64, windows-latest, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Debug, x86, windows-2022, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, windows-latest, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-2019, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-2019, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-2022, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-2022, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-latest, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-latest, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-2019, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-2019, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-2022, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-2022, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-latest, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-latest, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, dev) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, standard) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, dev) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, standard) (push) Has been cancelled
windows port / cross-build-on-linux (push) Has been cancelled
zephyr port / build (push) Has been cancelled
Python code lint and formatting with ruff / ruff (push) Has been cancelled
Some checks failed
JavaScript code lint and formatting with Biome / eslint (push) Has been cancelled
Check code formatting / code-formatting (push) Has been cancelled
Check spelling with codespell / codespell (push) Has been cancelled
Build docs / build (push) Has been cancelled
Check examples / embedding (push) Has been cancelled
Package mpremote / build (push) Has been cancelled
.mpy file format and tools / test (push) Has been cancelled
Build ports metadata / build (push) Has been cancelled
alif port / build_alif (alif_ae3_build) (push) Has been cancelled
cc3200 port / build (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3) (push) Has been cancelled
esp8266 port / build (push) Has been cancelled
mimxrt port / build (push) Has been cancelled
nrf port / build (push) Has been cancelled
powerpc port / build (push) Has been cancelled
qemu port / build_and_test_arm (push) Has been cancelled
qemu port / build_and_test_rv32 (push) Has been cancelled
renesas-ra port / build_renesas_ra_board (push) Has been cancelled
rp2 port / build (push) Has been cancelled
samd port / build (push) Has been cancelled
stm32 port / build_stm32 (stm32_misc_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_nucleo_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_pyb_build) (push) Has been cancelled
unix port / minimal (push) Has been cancelled
unix port / reproducible (push) Has been cancelled
unix port / standard (push) Has been cancelled
unix port / standard_v2 (push) Has been cancelled
unix port / coverage (push) Has been cancelled
unix port / coverage_32bit (push) Has been cancelled
unix port / nanbox (push) Has been cancelled
unix port / float (push) Has been cancelled
unix port / stackless_clang (push) Has been cancelled
unix port / float_clang (push) Has been cancelled
unix port / settrace (push) Has been cancelled
unix port / settrace_stackless (push) Has been cancelled
unix port / macos (push) Has been cancelled
unix port / qemu_mips (push) Has been cancelled
unix port / qemu_arm (push) Has been cancelled
unix port / qemu_riscv64 (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, x64, windows-2022, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x64, windows-latest, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Debug, x86, windows-2022, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, windows-latest, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-2019, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-2019, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-2022, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-2022, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-latest, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-latest, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-2019, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-2019, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-2022, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-2022, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-latest, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-latest, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, dev) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, standard) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, dev) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, standard) (push) Has been cancelled
windows port / cross-build-on-linux (push) Has been cancelled
zephyr port / build (push) Has been cancelled
Python code lint and formatting with ruff / ruff (push) Has been cancelled
This commit renames the NORETURN macro, indicating to the compiler
that a function does not return, into MP_NORETURN to maintain the same
naming convention of other similar macros.
To maintain compaitiblity with existing code NORETURN is aliased to
MP_NORETURN, but it is also deprecated for MicroPython v2.
This changeset was created using a similar process to
decf8e6a8b ("all: Remove the "STATIC"
macro and just use "static" instead."), with no documentation or python
scripts to change to reflect the new macro name.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit is contained in:
committed by
Damien George
parent
69993daa5c
commit
f47e214cdc
@@ -88,7 +88,7 @@ static machine_uart_obj_t machine_uart_repl_obj;
|
||||
static uint8_t machine_uart_repl_rxbuf[MICROPY_HW_UART_REPL_RXBUF];
|
||||
#endif
|
||||
|
||||
void NORETURN __fatal_error(const char *msg) {
|
||||
void MP_NORETURN __fatal_error(const char *msg) {
|
||||
for (volatile uint delay = 0; delay < 1000000; delay++) {
|
||||
}
|
||||
led_state(1, 1);
|
||||
|
||||
@@ -184,12 +184,12 @@ static mp_obj_t mp_machine_unique_id(void) {
|
||||
}
|
||||
|
||||
// Resets the pyboard in a manner similar to pushing the external RESET button.
|
||||
NORETURN static void mp_machine_reset(void) {
|
||||
MP_NORETURN static void mp_machine_reset(void) {
|
||||
powerctrl_mcu_reset();
|
||||
}
|
||||
|
||||
// Activate the bootloader without BOOT* pins.
|
||||
NORETURN void mp_machine_bootloader(size_t n_args, const mp_obj_t *args) {
|
||||
MP_NORETURN void mp_machine_bootloader(size_t n_args, const mp_obj_t *args) {
|
||||
#if MICROPY_HW_ENABLE_STORAGE
|
||||
storage_flush();
|
||||
#endif
|
||||
@@ -232,7 +232,7 @@ static void mp_machine_lightsleep(size_t n_args, const mp_obj_t *args) {
|
||||
powerctrl_enter_stop_mode();
|
||||
}
|
||||
|
||||
NORETURN static void mp_machine_deepsleep(size_t n_args, const mp_obj_t *args) {
|
||||
MP_NORETURN static void mp_machine_deepsleep(size_t n_args, const mp_obj_t *args) {
|
||||
if (n_args != 0) {
|
||||
mp_obj_t args2[2] = {MP_OBJ_NULL, args[0]};
|
||||
machine_rtc_wakeup(2, args2);
|
||||
|
||||
@@ -61,7 +61,7 @@ const byte mp_hal_status_to_errno_table[4] = {
|
||||
[HAL_TIMEOUT] = MP_ETIMEDOUT,
|
||||
};
|
||||
|
||||
NORETURN void mp_hal_raise(HAL_StatusTypeDef status) {
|
||||
MP_NORETURN void mp_hal_raise(HAL_StatusTypeDef status) {
|
||||
mp_raise_OSError(mp_hal_status_to_errno_table[status]);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ static inline int mp_hal_status_to_neg_errno(HAL_StatusTypeDef status) {
|
||||
return -mp_hal_status_to_errno_table[status];
|
||||
}
|
||||
|
||||
NORETURN void mp_hal_raise(HAL_StatusTypeDef status);
|
||||
MP_NORETURN void mp_hal_raise(HAL_StatusTypeDef status);
|
||||
void mp_hal_set_interrupt_char(int c); // -1 to disable
|
||||
|
||||
static inline void mp_hal_wake_main_task_from_isr(void) {
|
||||
|
||||
@@ -174,7 +174,7 @@ const lpm_instance_t g_lpm_standby = {
|
||||
|
||||
#endif
|
||||
|
||||
NORETURN void powerctrl_mcu_reset(void) {
|
||||
MP_NORETURN void powerctrl_mcu_reset(void) {
|
||||
#if BSP_TZ_SECURE_BUILD
|
||||
R_BSP_NonSecureEnter();
|
||||
#else
|
||||
@@ -185,7 +185,7 @@ NORETURN void powerctrl_mcu_reset(void) {
|
||||
}
|
||||
}
|
||||
|
||||
NORETURN void powerctrl_enter_bootloader(uint32_t r0, uint32_t bl_addr) {
|
||||
MP_NORETURN void powerctrl_enter_bootloader(uint32_t r0, uint32_t bl_addr) {
|
||||
while (1) {
|
||||
;
|
||||
}
|
||||
@@ -245,7 +245,7 @@ void powerctrl_enter_stop_mode(void) {
|
||||
enable_irq(irq_state);
|
||||
}
|
||||
|
||||
NORETURN void powerctrl_enter_standby_mode(void) {
|
||||
MP_NORETURN void powerctrl_enter_standby_mode(void) {
|
||||
rtc_init_finalise();
|
||||
|
||||
#if defined(MICROPY_BOARD_ENTER_STANDBY)
|
||||
|
||||
@@ -32,11 +32,11 @@
|
||||
|
||||
void SystemClock_Config(void);
|
||||
|
||||
NORETURN void powerctrl_mcu_reset(void);
|
||||
NORETURN void powerctrl_enter_bootloader(uint32_t r0, uint32_t bl_addr);
|
||||
MP_NORETURN void powerctrl_mcu_reset(void);
|
||||
MP_NORETURN void powerctrl_enter_bootloader(uint32_t r0, uint32_t bl_addr);
|
||||
void powerctrl_check_enter_bootloader(void);
|
||||
|
||||
void powerctrl_enter_stop_mode(void);
|
||||
NORETURN void powerctrl_enter_standby_mode(void);
|
||||
MP_NORETURN void powerctrl_enter_standby_mode(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_RA_POWERCTRL_H
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
typedef int (*KEYEX_CB)(uint32_t d);
|
||||
|
||||
extern void NORETURN __fatal_error(const char *msg);
|
||||
extern void MP_NORETURN __fatal_error(const char *msg);
|
||||
#if MICROPY_KBD_EXCEPTION
|
||||
extern int mp_interrupt_char;
|
||||
static KEYEX_CB keyex_cb[MICROPY_HW_MAX_UART] = {(KEYEX_CB)NULL};
|
||||
|
||||
Reference in New Issue
Block a user