]> git.proxmox.com Git - mirror_lxcfs.git/blame - src/proc_cpuview.h
meson: Cleanup build files
[mirror_lxcfs.git] / src / proc_cpuview.h
CommitLineData
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
17struct cpuacct_usage {
18 uint64_t user;
19 uint64_t system;
20 uint64_t idle;
21 bool online;
22};
1f5596dd
CB
23
24extern int cpuview_proc_stat(const char *cg, const char *cpuset,
25 struct cpuacct_usage *cg_cpu_usage,
26 int cg_cpu_usage_size, FILE *f, char *buf,
27 size_t buf_size);
28extern int proc_cpuinfo_read(char *buf, size_t size, off_t offset,
29 struct fuse_file_info *fi);
30extern int read_cpuacct_usage_all(char *cg, char *cpuset,
31 struct cpuacct_usage **return_usage, int *size);
4ec5c9da
CB
32extern bool init_cpuview(void);
33extern void free_cpuview(void);
34extern int max_cpu_count(const char *cg);
1f5596dd
CB
35
36#endif /* __LXCFS_PROC_CPUVIEW_FUSE_H */
37