Contributors: 10
Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
Sargun Dhillon |
71 |
33.65% |
2 |
14.29% |
Yosry Ahmed |
63 |
29.86% |
1 |
7.14% |
Daniel Borkmann |
26 |
12.32% |
1 |
7.14% |
Yafang Shao |
16 |
7.58% |
4 |
28.57% |
John Fastabend |
12 |
5.69% |
1 |
7.14% |
Yonghong Song |
11 |
5.21% |
1 |
7.14% |
Kui-Feng Lee |
6 |
2.84% |
1 |
7.14% |
Andrey Ignatov |
3 |
1.42% |
1 |
7.14% |
Hou Tao |
2 |
0.95% |
1 |
7.14% |
Greg Kroah-Hartman |
1 |
0.47% |
1 |
7.14% |
Total |
211 |
|
14 |
|
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __CGROUP_HELPERS_H
#define __CGROUP_HELPERS_H
#include <errno.h>
#include <string.h>
#define clean_errno() (errno == 0 ? "None" : strerror(errno))
#define log_err(MSG, ...) fprintf(stderr, "(%s:%d: errno: %s) " MSG "\n", \
__FILE__, __LINE__, clean_errno(), ##__VA_ARGS__)
/* cgroupv2 related */
int enable_controllers(const char *relative_path, const char *controllers);
int write_cgroup_file(const char *relative_path, const char *file,
const char *buf);
int write_cgroup_file_parent(const char *relative_path, const char *file,
const char *buf);
int cgroup_setup_and_join(const char *relative_path);
int get_root_cgroup(void);
int create_and_get_cgroup(const char *relative_path);
void remove_cgroup(const char *relative_path);
unsigned long long get_cgroup_id(const char *relative_path);
int get_cgroup1_hierarchy_id(const char *subsys_name);
int join_cgroup(const char *relative_path);
int join_root_cgroup(void);
int join_parent_cgroup(const char *relative_path);
int setup_cgroup_environment(void);
void cleanup_cgroup_environment(void);
/* cgroupv1 related */
int set_classid(void);
int join_classid(void);
unsigned long long get_classid_cgroup_id(void);
int open_classid(void);
int setup_classid_environment(void);
void cleanup_classid_environment(void);
#endif /* __CGROUP_HELPERS_H */