]>
Commit | Line | Data |
---|---|---|
db0463bf | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
1f5596dd CB |
2 | |
3 | #ifndef __LXCFS_PROC_CPUVIEW_FUSE_H | |
4 | #define __LXCFS_PROC_CPUVIEW_FUSE_H | |
5 | ||
2c6e12b7 | 6 | #include "config.h" |
1f5596dd CB |
7 | |
8 | #include <stdio.h> | |
9 | #include <stdlib.h> | |
10 | #include <sys/types.h> | |
11 | #include <unistd.h> | |
12 | ||
bb4e3c8f | 13 | #include "lxcfs_fuse.h" |
0a5da718 | 14 | |
1f5596dd CB |
15 | #include "macro.h" |
16 | ||
4ec5c9da CB |
17 | struct cpuacct_usage { |
18 | uint64_t user; | |
19 | uint64_t system; | |
20 | uint64_t idle; | |
21 | bool online; | |
22 | }; | |
1f5596dd | 23 | |
aad77984 | 24 | extern int cpuview_proc_stat(const char *cg, const char *cpu_cg, const char *cpuset, |
1f5596dd CB |
25 | struct cpuacct_usage *cg_cpu_usage, |
26 | int cg_cpu_usage_size, FILE *f, char *buf, | |
27 | size_t buf_size); | |
28 | extern int proc_cpuinfo_read(char *buf, size_t size, off_t offset, | |
29 | struct fuse_file_info *fi); | |
30 | extern int read_cpuacct_usage_all(char *cg, char *cpuset, | |
31 | struct cpuacct_usage **return_usage, int *size); | |
4ec5c9da CB |
32 | extern bool init_cpuview(void); |
33 | extern void free_cpuview(void); | |
aad77984 | 34 | extern int max_cpu_count(const char *cpuset_cg, const char *cpu_cg); |
1f5596dd CB |
35 | |
36 | #endif /* __LXCFS_PROC_CPUVIEW_FUSE_H */ | |
37 |