diff options
Diffstat (limited to 'src/stdio.c')
-rw-r--r-- | src/stdio.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/stdio.c b/src/stdio.c index 6aee7b3..2591971 100644 --- a/src/stdio.c +++ b/src/stdio.c @@ -24,7 +24,6 @@ #include <stdint.h> #include <stdio.h> -#include "cpu.h" #include "thread.h" #include "uart.h" @@ -68,11 +67,10 @@ printf(const char *format, ...) int vprintf(const char *format, va_list ap) { - uint32_t eflags; + uint32_t primask; int length; - thread_preempt_disable(); - eflags = cpu_intr_save(); + primask = thread_preempt_disable_intr_save(); length = vsnprintf(printf_buffer, sizeof(printf_buffer), format, ap); @@ -80,8 +78,7 @@ vprintf(const char *format, va_list ap) uart_write((uint8_t)*ptr); } - cpu_intr_restore(eflags); - thread_preempt_enable(); + thread_preempt_enable_intr_restore(primask); return length; } |