-/* Retrieves a key from the keyboard buffer.
- If the buffer is empty, waits for a key to be pressed. */
-uint8_t
-kbd_getc (void)
-{
- enum intr_level old_level;
- uint8_t key;
-
- old_level = intr_disable ();
- key = intq_getc (&buffer);
- intr_set_level (old_level);
-
- return key;
-}
-