xv6/pipe.c File Reference

#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 Documentation

#define PIPESIZE   512

Definition at line 10 of file pipe.c.

Referenced by piperead(), and pipewrite().


Function Documentation

int pipealloc ( struct file **  f0,
struct file **  f1 
)

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().


Generated on Fri Jan 7 12:25:49 2011 for xv6 by  doxygen 1.5.6