diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-11-15 00:46:44 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-11-19 20:15:48 -0700 |
commit | 5e04cdf350f9cede59263b52c2271f7c066439e3 (patch) | |
tree | 9d731c522a5a6d7b1bd49293f0350da1f4e2bd47 /libhw/w5500.c | |
parent | 712f71f1a7c6d06ce9f8f011c5d5c03add0e9d72 (diff) |
libcr: Begone with PRE_RUNNABLE
Diffstat (limited to 'libhw/w5500.c')
-rw-r--r-- | libhw/w5500.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libhw/w5500.c b/libhw/w5500.c index 08486d4..5678ffd 100644 --- a/libhw/w5500.c +++ b/libhw/w5500.c @@ -340,14 +340,14 @@ void _w5500_init(struct w5500 *chip, w5500_hard_reset(chip); /* Finally, wire in the interrupt handler. */ - cr_disable_interrupts(); + bool saved = cr_save_and_disable_interrupts(); for (size_t i = 0; i < ARRAY_LEN(w5500_chips); i++) { if (w5500_chips[i] == NULL) { w5500_chips[i] = chip; break; } } - cr_enable_interrupts(); + cr_restore_interrupts(saved); coroutine_add("w5500_irq", w5500_irq_cr, chip); } |