Skip to content

Commit

Permalink
Remove left-over print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
kaashoek committed Sep 15, 2016
1 parent d6dc5bc commit 912575a
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,12 @@ bget(uint dev, uint blockno)

acquire(&bcache.lock);

// cprintf("bget %d\n", blockno);

// Is the block already cached?
for(b = bcache.head.next; b != &bcache.head; b = b->next){
if(b->dev == dev && b->blockno == blockno){
//cprintf("bget %d; get sleep lock for buffer %p\n", blockno, b - bcache.buf);
b->refcnt++;
release(&bcache.lock);
acquiresleep(&b->lock);
//cprintf("bget: return buffer %p for blk %d\n", b - bcache.buf, blockno);
return b;
}
}
Expand All @@ -84,14 +80,12 @@ bget(uint dev, uint blockno)
// hasn't yet committed the changes to the buffer.
for(b = bcache.head.prev; b != &bcache.head; b = b->prev){
if(b->refcnt == 0 && (b->flags & B_DIRTY) == 0) {
// cprintf("bget %d; use %p for %d\n", b - bcache.buf, blockno);
b->dev = dev;
b->blockno = blockno;
b->flags = 0;
b->refcnt = 1;
release(&bcache.lock);
acquiresleep(&b->lock);
// cprintf("bget: return buffer %p for blk %d\n", b - bcache.buf, blockno);
return b;
}
}
Expand Down

0 comments on commit 912575a

Please sign in to comment.