-
Notifications
You must be signed in to change notification settings - Fork 0
/
fcache_count.hpp
37 lines (31 loc) · 1.36 KB
/
fcache_count.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*******************************************************************************
* fcache_count.hpp
*
* Some parts are copied (and modified) from https://github.com/feh/nocache
*
* Copyright (c) 2011 Julius Plenz <[email protected]>
* Copyright (c) 2017 Florian Kurpicz <[email protected]>
*
* All rights reserved. Published under the BSD-2 license in the LICENSE file.
******************************************************************************/
#ifndef FCACHE_COUNT_HEADER
#define FCACHE_COUNT_HEADER
#include "common.hpp"
using fcache_count_log_callback_type =
void (*)(void* profile, const file_pageinfo& message);
using fcache_count_register_fd_callback_type =
void (*)(void* profile, int fd, const char* file_name);
void fcache_count_set_log_callback(
fcache_count_log_callback_type call,void* profile);
void fcache_count_set_register_fd_callback(
fcache_count_register_fd_callback_type call, void* profile);
void init_mutexes();
void free_unclaimed_pages(int fd);
int insert_into_br_list(struct file_pageinfo *pi, struct byterange** brtail,
size_t pos, size_t len);
file_pageinfo* fd_get_pageinfo(int fd, struct file_pageinfo* pi);
void free_br_list(struct byterange** br);
void store_pageinfo(int fd);
void free_unclaimed_pages(int fd);
#endif // FCACHE_COUNT_HEADER
/******************************************************************************/