might want to write to the console.
#include <string.h>
#include "threads/io.h"
#include "threads/mmu.h"
#include <string.h>
#include "threads/io.h"
#include "threads/mmu.h"
+#include "threads/interrupt.h"
/* VGA text screen support. See [FREEVGA] for more information. */
/* VGA text screen support. See [FREEVGA] for more information. */
}
/* Writes C to the VGA text display, interpreting control
}
/* Writes C to the VGA text display, interpreting control
- characters in the conventional ways. */
+ characters in the conventional ways. */
+ /* Disable interrupts to lock out interrupt handlers
+ that might write to the console. */
+ enum intr_level old_level = intr_disable ();
+
/* Update cursor position. */
move_cursor ();
/* Update cursor position. */
move_cursor ();
+
+ intr_set_level (old_level);
}
\f
/* Clears the screen and moves the cursor to the upper left. */
}
\f
/* Clears the screen and moves the cursor to the upper left. */