nckernel  0.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
fat_cache.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct fat_cachecreate_fat_cache (const char *node, int size)
 
void destroy_fat_cache (struct fat_cache *cache)
 
void * fat_cache (struct fat_cache *cache)
 
void fat_cache_lock (struct fat_cache *cache)
 
int fat_cache_size (struct fat_cache *cache)
 
void fat_cache_unlock (struct fat_cache *cache)
 
int update_fat_cache (struct fat_cache *cache, off_t offset)
 

Function Documentation

struct fat_cache* create_fat_cache ( const char *  node,
int  size 
)

Definition at line 21 of file fat_cache.c.

References fat_cache::buffer, close(), free(), fat_cache::handle, malloc(), fat_cache::mutex, NULL, O_RDWR, fat_cache::offset, open(), pthread_mutex_init(), and fat_cache::size.

Referenced by fat_load().

Here is the call graph for this function:

Here is the caller graph for this function:

void destroy_fat_cache ( struct fat_cache cache)

Definition at line 49 of file fat_cache.c.

References fat_cache::buffer, close(), free(), fat_cache::handle, fat_cache::mutex, and pthread_mutex_destroy().

Referenced by fat_load().

Here is the call graph for this function:

Here is the caller graph for this function:

void* fat_cache ( struct fat_cache cache)

Definition at line 89 of file fat_cache.c.

References fat_cache::buffer.

void fat_cache_lock ( struct fat_cache cache)

Definition at line 99 of file fat_cache.c.

References fat_cache::mutex, and pthread_mutex_lock().

Here is the call graph for this function:

int fat_cache_size ( struct fat_cache cache)

Definition at line 94 of file fat_cache.c.

References fat_cache::size.

void fat_cache_unlock ( struct fat_cache cache)

Definition at line 104 of file fat_cache.c.

References fat_cache::mutex, and pthread_mutex_unlock().

Here is the call graph for this function:

int update_fat_cache ( struct fat_cache cache,
off_t  offset 
)

Definition at line 57 of file fat_cache.c.

References fat_cache::buffer, EINVAL, fat_cache::handle, lseek(), fat_cache::offset, printf(), read(), SEEK_SET, and fat_cache::size.

Referenced by fat_load().

Here is the call graph for this function:

Here is the caller graph for this function: