#include "types.h"#include "defs.h"#include "param.h"#include "mmu.h"#include "proc.h"#include "fs.h"#include "file.h"#include "spinlock.h"Go to the source code of this file.
Data Structures | |
| struct | pipe |
Defines | |
| #define | PIPESIZE 512 |
Functions | |
| int | pipealloc (struct file **f0, struct file **f1) |
| void | pipeclose (struct pipe *p, int writable) |
| int | pipewrite (struct pipe *p, char *addr, int n) |
| int | piperead (struct pipe *p, char *addr, int n) |
| #define PIPESIZE 512 |
Definition at line 22 of file pipe.c.
References filealloc(), fileclose(), initlock(), kalloc(), kfree(), pipe::lock, pipe::nread, pipe::nwrite, PAGE, pipe::readopen, and pipe::writeopen.
Referenced by sys_pipe().
| void pipeclose | ( | struct pipe * | p, | |
| int | writable | |||
| ) |
Definition at line 58 of file pipe.c.
References acquire(), kfree(), pipe::lock, pipe::nread, pipe::nwrite, PAGE, pipe::readopen, release(), wakeup(), and pipe::writeopen.
Referenced by fileclose().
| int piperead | ( | struct pipe * | p, | |
| char * | addr, | |||
| int | n | |||
| ) |
Definition at line 98 of file pipe.c.
References acquire(), pipe::data, pipe::lock, pipe::nread, pipe::nwrite, PIPESIZE, release(), sleep(), wakeup(), and pipe::writeopen.
Referenced by fileread().
| int pipewrite | ( | struct pipe * | p, | |
| char * | addr, | |||
| int | n | |||
| ) |
Definition at line 76 of file pipe.c.
References acquire(), pipe::data, pipe::lock, pipe::nread, pipe::nwrite, PIPESIZE, pipe::readopen, release(), sleep(), and wakeup().
Referenced by filewrite().
1.5.6