blob: a0b82d6b452d98eee645da5b2bc9556ef39541c1 [file] [log] [blame]
Greg Hartman76d05dc2016-11-23 15:51:27 -08001#ifndef _CACHE_H
2#define _CACHE_H
3
4#include <stdint.h>
5#include <com32.h>
6#include "disk.h"
7#include "fs.h"
8
9/* The cache structure */
10struct cache {
11 block_t block;
12 struct cache *prev;
13 struct cache *next;
14 void *data;
15};
16
17/* functions defined in cache.c */
18void cache_init(struct device *, int);
19const void *get_cache(struct device *, block_t);
20struct cache *_get_cache_block(struct device *, block_t);
21void cache_lock_block(struct cache *);
22size_t cache_read(struct fs_info *, void *, uint64_t, size_t);
23
24#endif /* cache.h */