|
nckernel
0.1
|
#include <sys/types.h>#include <stdio.h>#include <stdlib.h>#include <stddef.h>#include <stdint.h>#include <fcntl.h>#include <unistd.h>#include <pthread.h>#include <errno.h>#include <fat_cache.h>
Go to the source code of this file.
Data Structures | |
| struct | fat_cache |
Functions | |
| struct fat_cache * | create_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) |
| 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().


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


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

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

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


1.8.4