summaryrefslogtreecommitdiff
path: root/ide.c
diff options
context:
space:
mode:
authorrsc <rsc>2006-09-07 14:28:12 +0000
committerrsc <rsc>2006-09-07 14:28:12 +0000
commitbb207a1d42c9a75a64af35de4f12912176ebfc8d (patch)
treeb762f80b034299b64d60d574f6eb23f6c7478068 /ide.c
parent52253dce6581ab381091720d3df9f3037ce38f7b (diff)
downloadxv6-labs-bb207a1d42c9a75a64af35de4f12912176ebfc8d.tar.gz
xv6-labs-bb207a1d42c9a75a64af35de4f12912176ebfc8d.tar.bz2
xv6-labs-bb207a1d42c9a75a64af35de4f12912176ebfc8d.zip
comments
Diffstat (limited to 'ide.c')
-rw-r--r--ide.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ide.c b/ide.c
index 4e2e1a6..3afd19b 100644
--- a/ide.c
+++ b/ide.c
@@ -17,6 +17,12 @@
#define IDE_CMD_READ 0x20
#define IDE_CMD_WRITE 0x30
+// IDE request queue.
+// The next request will be stored in request[head],
+// and the request currently being served by the disk
+// is request[tail].
+// Must hold ide_lock while manipulating queue.
+
struct ide_request {
int diskno;
uint secno;
@@ -28,6 +34,7 @@ struct ide_request {
struct ide_request request[NREQUEST];
int head, tail;
struct spinlock ide_lock;
+
int disk_1_present;
int disk_channel;