equal
deleted
inserted
replaced
3 |
3 |
4 struct cache_engine { |
4 struct cache_engine { |
5 /* |
5 /* |
6 * Allocate a `struct cache`-compatible struct and return it via cache_ptr. |
6 * Allocate a `struct cache`-compatible struct and return it via cache_ptr. |
7 */ |
7 */ |
8 int (fn_init*) (struct cache_engine *engine, struct cache **cache_ptr); |
8 int (*fn_init) (struct cache_engine *, struct cache **); |
9 |
9 |
10 /* |
10 /* |
11 * Allocate a `struct cache_op`-compatible struct and return it via cache_ptr. |
11 * Allocate a `struct cache_op`-compatible struct and return it via cache_ptr. |
12 * |
12 * |
13 * Begin the index lookup. |
13 * Begin the index lookup. |
14 */ |
14 */ |
15 int (fn_op_start*) (struct cache *cache, struct cache_op **op_ptr, struct cache_key *key); |
15 int (*fn_op_start) (struct cache *, struct cache_op **, struct cache_key *); |
|
16 |
|
17 /* |
|
18 * Prepare to write and possibly read this cache entry. |
|
19 * |
|
20 * size_hint, if nonzero, provides a guess at the size of the cache entry that can be used to optimize stuff |
|
21 */ |
|
22 int (*fn_op_begin_write) (struct cache_op *, size_t size_hint); |
|
23 |
|
24 int (*fn_op_push) (struct cache_op *op, int fd, size_t *size); |
16 }; |
25 }; |
17 |
26 |
18 #endif /* CACHE_ENGINE_H */ |
27 #endif /* CACHE_ENGINE_H */ |
19 |
28 |