xv6/bio.c File Reference

#include "types.h"
#include "defs.h"
#include "param.h"
#include "spinlock.h"
#include "buf.h"

Go to the source code of this file.

Functions

void binit (void)
static struct bufbget (uint dev, uint sector)
struct bufbread (uint dev, uint sector)
void bwrite (struct buf *b)
void brelse (struct buf *b)

Variables

struct {
   struct spinlock   lock
   struct buf   buf [NBUF]
   struct buf   head
bcache


Function Documentation

static struct buf* bget ( uint  dev,
uint  sector 
) [static, read]

Definition at line 62 of file bio.c.

References acquire(), B_BUSY, bcache, buf::dev, buf::flags, buf::next, panic(), buf::prev, release(), buf::sector, and sleep().

Referenced by bread().

void binit ( void   ) 

Definition at line 40 of file bio.c.

References bcache, buf::dev, initlock(), NBUF, buf::next, and buf::prev.

Referenced by mpmain().

struct buf* bread ( uint  dev,
uint  sector 
) [read]

Definition at line 97 of file bio.c.

References B_VALID, bget(), buf::flags, and iderw().

Referenced by balloc(), bfree(), bmap(), bzero(), dirlookup(), ialloc(), ilock(), itrunc(), iupdate(), readi(), readsb(), and writei().

void brelse ( struct buf b  ) 

void bwrite ( struct buf b  ) 

Definition at line 109 of file bio.c.

References B_BUSY, B_DIRTY, buf::flags, iderw(), and panic().

Referenced by balloc(), bfree(), bmap(), bzero(), ialloc(), iupdate(), and writei().


Variable Documentation

struct { ... } bcache

Referenced by bget(), binit(), and brelse().

struct buf buf[NBUF]

Definition at line 32 of file bio.c.

struct buf head

Definition at line 36 of file bio.c.

struct spinlock lock

Definition at line 31 of file bio.c.


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