don't send keyboard interrupts to the second cpu, if we have only one cpu.
xv6 seems to work fine on uniprocessor now.
This commit is contained in:
parent
7abf49d2f2
commit
0b6ab8416e
1
Notes
1
Notes
|
@ -117,7 +117,6 @@ echo foo > bar should truncate bar
|
||||||
so O_CREATE should not truncate
|
so O_CREATE should not truncate
|
||||||
but O_TRUNC should
|
but O_TRUNC should
|
||||||
|
|
||||||
make it work on one cpu
|
|
||||||
make it work on a real machine
|
make it work on a real machine
|
||||||
release before acquire at end of sleep?
|
release before acquire at end of sleep?
|
||||||
check 2nd disk (i.e. if not in .bochsrc)
|
check 2nd disk (i.e. if not in .bochsrc)
|
||||||
|
|
|
@ -365,8 +365,9 @@ console_read(int minor, char *dst, int n)
|
||||||
|
|
||||||
acquire(&kbd_lock);
|
acquire(&kbd_lock);
|
||||||
|
|
||||||
while(kbd_w == kbd_r)
|
while(kbd_w == kbd_r) {
|
||||||
sleep(&kbd_r, &kbd_lock);
|
sleep(&kbd_r, &kbd_lock);
|
||||||
|
}
|
||||||
|
|
||||||
while(n > 0 && kbd_w != kbd_r){
|
while(n > 0 && kbd_w != kbd_r){
|
||||||
*dst = (kbd_buf[kbd_r]) & 0xff;
|
*dst = (kbd_buf[kbd_r]) & 0xff;
|
||||||
|
@ -392,7 +393,7 @@ console_init()
|
||||||
devsw[CONSOLE].d_write = console_write;
|
devsw[CONSOLE].d_write = console_write;
|
||||||
devsw[CONSOLE].d_read = console_read;
|
devsw[CONSOLE].d_read = console_read;
|
||||||
|
|
||||||
ioapic_enable (IRQ_KBD, 1);
|
ioapic_enable (IRQ_KBD, 0);
|
||||||
|
|
||||||
use_console_lock = 1;
|
use_console_lock = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue