From 4ba2bcacdde59e70754df916dcee39e45d564441 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 27 Aug 2004 07:17:37 +0000 Subject: [PATCH] printk() disables interrupts. --- src/lib/lib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/lib.c b/src/lib/lib.c index 7112ba2..be4397e 100644 --- a/src/lib/lib.c +++ b/src/lib/lib.c @@ -3,6 +3,7 @@ #include #include #include "debug.h" +#include "interrupt.h" #include "lib.h" #include "serial.h" #include "vga.h" @@ -128,7 +129,9 @@ output_console (char ch, void *aux __attribute__ ((unused))) void vprintk (const char *format, va_list args) { + enum if_level old_level = intr_disable (); vprintf_core (format, args, output_console, NULL); + intr_set_level (old_level); } void -- 2.30.2