summaryrefslogtreecommitdiff
path: root/defs.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 /defs.h
parentb61c2547b8b489cab16984c0940a1cb6593a2a3d (diff)
downloadxv6-labs-c41f1de5d41a527a3fa2d1e94215766130eac456.tar.gz
xv6-labs-c41f1de5d41a527a3fa2d1e94215766130eac456.tar.bz2
xv6-labs-c41f1de5d41a527a3fa2d1e94215766130eac456.zip
file descriptors
pipes
Diffstat (limited to 'defs.h')
-rw-r--r--defs.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/defs.h b/defs.h
index f10859e..d7cc09b 100644
--- a/defs.h
+++ b/defs.h
@@ -37,6 +37,7 @@ void pic_init(void);
void mp_init(void);
int cpu(void);
int mp_isbcpu(void);
+void lapic_init(int c);
// spinlock.c
extern uint32_t kernel_lock;
@@ -46,3 +47,18 @@ void release_grant_spinlock(uint32_t* lock, int cpu);
// main.c
void load_icode(struct proc *p, uint8_t *binary, unsigned size);
+
+// pipe.c
+struct pipe;
+struct fd;
+int pipe_alloc(struct fd **fd1, struct fd **fd2);
+void pipe_close(struct pipe *p, int writeable);
+int pipe_write(struct pipe *p, char *addr, int n);
+int pipe_read(struct pipe *p, char *addr, int n);
+
+// fd.c
+int fd_ualloc();
+struct fd * fd_alloc();
+void fd_close(struct fd *);
+int fd_read(struct fd *fd, char *addr, int n);
+int fd_write(struct fd *fd, char *addr, int n);