C: define many functions using predefine..
/* Defines COUNTER. There must be exactly one such definition at file scope
* within a program. */
#define COVERAGE_DEFINE(COUNTER) \
DEFINE_STATIC_PER_THREAD_DATA(unsigned int, \
counter_##COUNTER, ); \
static unsigned int COUNTER##_count(void) \
{ \
unsigned int *countp = counter_##COUNTER##_get(); \
unsigned int count = *countp; \
*countp = ; \
return count; \
} \
static inline void COUNTER##_add(unsigned int n) \
{ \
*counter_##COUNTER##_get() += n; \
} \
extern struct coverage_counter counter_##COUNTER; \
struct coverage_counter counter_##COUNTER \
= { #COUNTER, COUNTER##_count, , , {}, {} }; \
OVS_CONSTRUCTOR(COUNTER##_init) { \
coverage_counter_register(&counter_##COUNTER); \
}
C: define many functions using predefine..的更多相关文章
- Adding New Functions to MySQL(User-Defined Function Interface UDF、Native Function)
catalog . How to Add New Functions to MySQL . Features of the User-Defined Function Interface . User ...
- C-Language Functions
转自:https://www.postgresql.org/docs/9.6/xfunc-c.html 可以作为学习基于c编写pg extension 的资料 36.9. C-Language Fun ...
- How to use the functions of apply and call
Although apply and call can implement same function. However, there is a litter different between ...
- Functional Programming without Lambda - Part 1 Functional Composition
Functions in Java Prior to the introduction of Lambda Expressions feature in version 8, Java had lon ...
- Openfire Strophe开发中文乱码问题
网站上有很多Openfire Web方案,之前想用Smack 但是jar包支持客户端版本的,还有JDK版本问题 一直没调试成功 估计成功的方法只能拜读源码进行修改了. SparkWeb 官网代码很 ...
- Google C++ Style Guide
Background C++ is one of the main development languages used by many of Google's open-source project ...
- Matlab 进阶学习记录
最近在看 Faster RCNN的Matlab code,发现很多matlab技巧,在此记录: 1. conf_proposal = proposal_config('image_means', ...
- (转)Image Segmentation with Tensorflow using CNNs and Conditional Random Fields
Daniil's blog Machine Learning and Computer Vision artisan. About/ Blog/ Image Segmentation with Ten ...
- <<Differential Geometry of Curves and Surfaces>>笔记
<Differential Geometry of Curves and Surfaces> by Manfredo P. do Carmo real line Rinterval I== ...
随机推荐
- MVC3+EF4.1学习系列(十)----MVC+EF处理树形结构
通过前几篇文章 我们处理了 一对一, 一对多,多对多关系 很好的发挥了ORM框架的做用 但是 少说了一种 树形结构的处理, 而这种树形关系 我们也经常遇到,常见的N级类别的处理, 以及经常有数据与类别 ...
- CreateProcess注意的几个地方
1.CreateProcess失败,GetLastError返回998,应该是最后两个参数没有初始化导致的. 2.要使外部程序隐藏窗口运行,需要将STARTUPINFO的dwFlags指定为START ...
- 七牛 在线管理 v0.1
<?php // @codingStandardsIgnoreFile require_once __DIR__.'/../vendor/autoload.php'; use Qiniu\Aut ...
- Just do it!!!
4月英语竞赛期中考试 5月初级程序员考试 6月英语四级考试 7月期末考试 加油吧年轻人!
- android资源文件的选取
Android app项目中,res是用来存放资源文件的,来看看这些文件的创建和选取规则: 系统启动一个apk后,生成UI的过程中,会根据不同的系统配置来匹配.选择相应的资源文件. You shoul ...
- crontab定时任务
使用cron服务,用 service crond status 查看 cron服务状态,如果没有启动则 service crond start启动它, cron服务是一个定时执行的服务,可以通过cro ...
- Python 学习笔记12
不积跬步,无以至千里.不积小流,无以成江河. 当我觉得沮丧.绝望的时候,就疯狂的敲代码,这样会好受一点. 今天和昨天敲了两天的小程序,算是对python的具体语法规则有个初步的手熟. http://w ...
- AS3.0杂记——Dictionary、Object与Array
来源:http://blog.csdn.net/m_leonwang/article/details/8811829 Object.Array与Dictionary都是关联数组,就是用“键”来索引存储 ...
- Quartz(任务调度)- 入门学习
参照:http://blog.csdn.net/szwangdf/article/details/6158646 1.自定义定时任务管理类 QuartzManager 参照大神基础上新增:1.添加jo ...
- win8.1去掉鼠标右键回收站“固定到开始”屏幕的方法
平台:win8.1 问题:桌面“回收站”右键菜单里有个“固定到开始屏幕”,一不小心就误按,设法删除之. 打开注册表编辑器.在注册表编辑器里面定位到:HKEY_LOCAL_MACHINE\SOFTWAR ...