pintos/src/filesys/free-map.c File Reference

#include "filesys/free-map.h"
#include <bitmap.h>
#include <debug.h>
#include "filesys/file.h"
#include "filesys/filesys.h"
#include "filesys/inode.h"

Go to the source code of this file.

Functions

void free_map_init (void)
bool free_map_allocate (size_t cnt, block_sector_t *sectorp)
void free_map_release (block_sector_t sector, size_t cnt)
void free_map_open (void)
void free_map_close (void)
void free_map_create (void)

Variables

static struct filefree_map_file
static struct bitmapfree_map


Function Documentation

bool free_map_allocate ( size_t  cnt,
block_sector_t sectorp 
)

Definition at line 28 of file free-map.c.

References BITMAP_ERROR, bitmap_scan_and_flip(), bitmap_set_multiple(), and NULL.

Referenced by filesys_create(), and inode_create().

void free_map_close ( void   ) 

Definition at line 65 of file free-map.c.

References file_close().

Referenced by do_format(), and filesys_done().

void free_map_create ( void   ) 

Definition at line 73 of file free-map.c.

References file_open(), FREE_MAP_SECTOR, inode_create(), inode_open(), NULL, and PANIC.

Referenced by do_format().

void free_map_init ( void   ) 

Definition at line 14 of file free-map.c.

References bitmap_create(), bitmap_mark(), block_size(), FREE_MAP_SECTOR, fs_device, NULL, PANIC, and ROOT_DIR_SECTOR.

Referenced by filesys_init().

void free_map_open ( void   ) 

Definition at line 54 of file free-map.c.

References file_open(), FREE_MAP_SECTOR, inode_open(), NULL, and PANIC.

Referenced by filesys_init().

void free_map_release ( block_sector_t  sector,
size_t  cnt 
)

Definition at line 45 of file free-map.c.

References ASSERT, bitmap_all(), and bitmap_set_multiple().

Referenced by filesys_create(), and inode_close().


Variable Documentation

struct bitmap* free_map [static]

Definition at line 10 of file free-map.c.

struct file* free_map_file [static]

Definition at line 9 of file free-map.c.


Generated on Mon Jan 10 16:43:58 2011 for Pintos by  doxygen 1.5.6