diff options
author | rtm <rtm> | 2006-06-27 14:35:53 +0000 |
---|---|---|
committer | rtm <rtm> | 2006-06-27 14:35:53 +0000 |
commit | c41f1de5d41a527a3fa2d1e94215766130eac456 (patch) | |
tree | 86f6a467be8b42aec42a05299789f39ace9cc5e2 /defs.h | |
parent | b61c2547b8b489cab16984c0940a1cb6593a2a3d (diff) | |
download | xv6-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.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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); |