summaryrefslogtreecommitdiff
path: root/ide.c
diff options
context:
space:
mode:
Initial version of single-cpu xv6 with page tables
Diffstat (limited to 'ide.c')
-rw-r--r--ide.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ide.c b/ide.c
index c0eb80a..7b12aa0 100644
--- a/ide.c
+++ b/ide.c
@@ -147,8 +147,9 @@ iderw(struct buf *b)
// Wait for request to finish.
// Assuming will not sleep too long: ignore proc->killed.
- while((b->flags & (B_VALID|B_DIRTY)) != B_VALID)
+ while((b->flags & (B_VALID|B_DIRTY)) != B_VALID) {
sleep(b, &idelock);
+ }
release(&idelock);
}