projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Turn off assertions when running in the kernel.
[pintos-anon]
/
src
/
devices
/
kbd.c
diff --git
a/src/devices/kbd.c
b/src/devices/kbd.c
index ea9835876a53626e11d00d663e92b7501c4ba157..9cd28400864abddcc1a18fa586eaf5951d9a96bb 100644
(file)
--- a/
src/devices/kbd.c
+++ b/
src/devices/kbd.c
@@
-40,11
+40,12
@@
kbd_init (void)
uint8_t
kbd_getc (void)
{
uint8_t
kbd_getc (void)
{
+ enum intr_level old_level;
uint8_t key;
uint8_t key;
-
-
intq_lock (&buffer
);
+
+
old_level = intr_disable (
);
key = intq_getc (&buffer);
key = intq_getc (&buffer);
- int
q_unlock (&buffer
);
+ int
r_set_level (old_level
);
return key;
}
return key;
}