From c41f1de5d41a527a3fa2d1e94215766130eac456 Mon Sep 17 00:00:00 2001 From: rtm <rtm> Date: Tue, 27 Jun 2006 14:35:53 +0000 Subject: file descriptors pipes --- defs.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'defs.h') 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); -- cgit v1.2.3