summaryrefslogtreecommitdiff
path: root/fd.h
diff options
context:
space:
mode:
authorrtm <rtm>2006-06-27 14:35:53 +0000
committerrtm <rtm>2006-06-27 14:35:53 +0000
commitc41f1de5d41a527a3fa2d1e94215766130eac456 (patch)
tree86f6a467be8b42aec42a05299789f39ace9cc5e2 /fd.h
parentb61c2547b8b489cab16984c0940a1cb6593a2a3d (diff)
downloadxv6-labs-c41f1de5d41a527a3fa2d1e94215766130eac456.tar.gz
xv6-labs-c41f1de5d41a527a3fa2d1e94215766130eac456.tar.bz2
xv6-labs-c41f1de5d41a527a3fa2d1e94215766130eac456.zip
file descriptors
pipes
Diffstat (limited to 'fd.h')
-rw-r--r--fd.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/fd.h b/fd.h
new file mode 100644
index 0000000..c8d0c34
--- /dev/null
+++ b/fd.h
@@ -0,0 +1,9 @@
+struct fd {
+ enum { FD_CLOSED, FD_NONE, FD_PIPE } type;
+ int count; // reference count
+ char readable;
+ char writeable;
+ struct pipe *pipe;
+};
+
+extern struct fd fds[NFD];