From 7ea6c9d19747c84ede9b056475cd9046c89a4d33 Mon Sep 17 00:00:00 2001 From: kaashoek Date: Mon, 10 Jul 2006 19:06:48 +0000 Subject: queue with disk requests --- syscall.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'syscall.c') diff --git a/syscall.c b/syscall.c index c7627ea..787eb64 100644 --- a/syscall.c +++ b/syscall.c @@ -229,15 +229,16 @@ sys_block(void) { char buf[512]; int i, j; + void *c; cprintf("%d: call sys_block\n", cpu()); for (i = 0; i < 100; i++) { - if (ide_start_read(i, buf, 1)) { + if ((c = ide_start_read(i, buf, 1)) == 0) { panic("couldn't start read\n"); } cprintf("call sleep\n"); - sleep (&disk_channel); - if (ide_read(i, buf, 1)) { + sleep (c); + if (ide_finish_read(c)) { panic("couldn't do read\n"); } cprintf("sector %d: ", i); -- cgit v1.2.3