diff options
| author | kaashoek <kaashoek> | 2006-07-10 19:06:48 +0000 |
|---|---|---|
| committer | kaashoek <kaashoek> | 2006-07-10 19:06:48 +0000 |
| commit | 7ea6c9d19747c84ede9b056475cd9046c89a4d33 (patch) | |
| tree | 447e7a317e09f79b8ab89663822f37f81afd3052 /syscall.c | |
| parent | 084f21430c152eeaeaf8534fab41eca91a5fe7a9 (diff) | |
| download | xv6-labs-2022-7ea6c9d19747c84ede9b056475cd9046c89a4d33.tar.xz xv6-labs-2022-7ea6c9d19747c84ede9b056475cd9046c89a4d33.zip | |
queue with disk requests
Diffstat (limited to 'syscall.c')
| -rw-r--r-- | syscall.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); |
