8 Star 4 Fork 2

openEuler/A-Tune-BPF-Collection

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
common_helper.h 817 Bytes
一键复制 编辑 原始数据 按行查看 历史
Lv Ying 提交于 2022-10-16 15:42 . add test framework and testcasese
#ifndef _COMMON_HELPER_H
#define _COMMON_HELPER_H
#include <syslog.h>
#include <stdio.h>
#define SHASH 11
#define SYSLOG (1 << 0)
#define TERM (1 << 1)
#define ALL (SYSLOG | TERM)
#define log(where, level, fmt, args...) do { \
if (where & SYSLOG) \
syslog(level, fmt, ##args); \
if (where & TERM) { \
fprintf(stderr, fmt, ##args); \
fflush(stderr); \
} \
} while (0)
struct opt {
struct opt *next;
char *name;
char *val;
};
struct opt **parse_init(unsigned int size);
void parse_fini(struct opt **opts, unsigned int size);
int parse_config_file(unsigned int where, const char *conf_fn, struct opt **opts, unsigned int size);
char* config_opt(struct opt **opts, unsigned int size, const char *name);
void bump_memlock_rlimit(unsigned int where);
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler/A-Tune-BPF-Collection.git
git@gitee.com:openeuler/A-Tune-BPF-Collection.git
openeuler
A-Tune-BPF-Collection
A-Tune-BPF-Collection
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385