C skills
来源:互联网 发布:三菱编程手册da 编辑:程序博客网 时间:2024/05/11 03:55
1):define 中的#和##
## 是连接符号,连接两个字符串
# 是把名字代替成参数中的字符串
#define PRINTF(value) printf( #value " = %d/n", value );
#define FUNC(arg)
void print##arg(void)
{
printf(#arg " = %d", arg);
}
FUNC(size);
展开后生成代码:void printsize(void)
{
printf("size" " = %d", size );
}
2):try_module_get()
static inline int try_module_get(struct module *module)
{
int ret = 1;
if (module) {
preempt_disable();
if (likely(module_is_live(module))) {
__this_cpu_inc(module->refptr->incs);
trace_module_get(module, _THIS_IP_);
} else
ret = 0;
preempt_enable();
}
return ret;
}
3):pr_info()
#define pr_info(fmt, ...) \
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
4)printk("Calling : %pF\n", fn);
fn是函数的指针,可以直接打印出函数指针所指向函数的名字
- C skills
- C program:"extern" skills
- Codeforces 581C Developing Skills
- codeforces 581C Developing Skills
- cf 591 C. Developing Skills
- CF 581C Developing Skills
- coderforce 581C. Developing Skills
- codeforces 581C Developing Skills
- CodeForces 581C Developing Skills
- Codeforces-581C-Developing Skills
- SKILLS
- Codeforces 581C Developing Skills 贪心
- codefoces 581C Developing Skills(贪心)
- Codeforces Round #322 C Developing Skills
- CodeForces 581C - Developing Skills(模拟)
- codeforces 581-C. Developing Skills(贪心)
- [CF.Skills]在.NET CF中嵌入Media Player(C#)
- CF#322-C-Developing Skills-模拟大水题
- 配置环境变量
- Android 模拟器命令
- hibernate映射关系注解分析总结(2012.06.15)
- [美化素材] 字体大小不合适?“FontCreator”搞定!
- Rest.pm
- C skills
- 刷机之后的多媒体文件中文乱码之终极解决方案
- 怳然大悟作者生活が舞う雪のよう
- fontCreator重命名字体文件后会给字体带来Bug么,
- Hibernate下的Unknown column 'student_number' in 'field list'错误
- CMFCMenuBar和CMFCToolBar相同ID,在显示不同标签文字
- Kruskal 最小生成树(输出最小生成树的路径,权值的和) 参考poj 1258
- 今天再补一篇
- 深刻理解Java编程的7个例子