提交 8e88f9e2 创建 作者: rtm's avatar rtm

comment nits

上级 4d39b633
// On-disk file system format. // On-disk file system format.
// This header is shared between kernel and user space. // Both the kernel and user programs use this header file.
// Block 0 is unused. // Block 0 is unused.
// Block 1 is super block. // Block 1 is super block.
......
...@@ -18,10 +18,9 @@ ...@@ -18,10 +18,9 @@
#define IDE_CMD_READ 0x20 #define IDE_CMD_READ 0x20
#define IDE_CMD_WRITE 0x30 #define IDE_CMD_WRITE 0x30
// IDE request queue.
// ide_queue points to the buf now being read/written to the disk. // ide_queue points to the buf now being read/written to the disk.
// ide_queue->qnext points to the next buf to be processed. // ide_queue->qnext points to the next buf to be processed.
// Must hold ide_lock while manipulating queue. // You must hold ide_lock while manipulating queue.
static struct spinlock ide_lock; static struct spinlock ide_lock;
static struct buf *ide_queue; static struct buf *ide_queue;
...@@ -84,7 +83,6 @@ ide_intr(void) ...@@ -84,7 +83,6 @@ ide_intr(void)
{ {
acquire(&ide_lock); acquire(&ide_lock);
if(ide_queue){ if(ide_queue){
//cprintf("intr %x\n", ide_queue);
if((ide_queue->flags & B_WRITE) == 0) if((ide_queue->flags & B_WRITE) == 0)
if(ide_wait_ready(1) >= 0) if(ide_wait_ready(1) >= 0)
insl(0x1F0, ide_queue->data, 512/4); insl(0x1F0, ide_queue->data, 512/4);
...@@ -105,7 +103,6 @@ ide_start_request (void) ...@@ -105,7 +103,6 @@ ide_start_request (void)
{ {
if(ide_queue){ if(ide_queue){
ide_wait_ready(0); ide_wait_ready(0);
//cprintf("start %x\n", ide_queue);
outb(0x3f6, 0); // generate interrupt outb(0x3f6, 0); // generate interrupt
outb(0x1F2, 1); // number of sectors outb(0x1F2, 1); // number of sectors
outb(0x1F3, ide_queue->sector & 0xFF); outb(0x1F3, ide_queue->sector & 0xFF);
...@@ -139,8 +136,6 @@ ide_rw(struct buf *b) ...@@ -139,8 +136,6 @@ ide_rw(struct buf *b)
b->done = 0; b->done = 0;
b->qnext = 0; b->qnext = 0;
// cprintf("enqueue %x %x\n", b, ide_queue);
// append b to ide_queue // append b to ide_queue
pp = &ide_queue; pp = &ide_queue;
while(*pp) while(*pp)
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论