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== ...
随机推荐
- 使用EasyBCD 从硬盘安装 deepin2014.1
EasyBCD config code: title Install Deepin2014 root (hd0,1) kernel (hd0,1)/vmlinuz boot=casper iso-s ...
- 背包类问题解答——poj3624分析
习题网址:http://poj.org/problem?id=3624 试题分析:该类题通过限定物品总数量.总质量:并且初始化每个物品的起始质量和一个量化的性质.最后求解最值的量化性质的值是多少的问题 ...
- HDU 2216 Game III(BFS)
Game III Problem Description Zjt and Sara will take part in a game, named Game III. Zjt and Sara wil ...
- .Net Core 学习资料
官方网站:https://www.microsoft.com/net/core#windows 官方文档:https://docs.asp.net/en/latest/intro.html 中 ...
- java中的基本数据类型的转换
本文参考了如下两篇文章: https://my.oschina.net/joymufeng/blog/139952 http://www.cnblogs.com/lwbqqyumidi/p/37001 ...
- LeetCode OJ 11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). ...
- BestCoder Round #85 A B C
本来没有写博客的打算,可是看完了题解感觉这三道题这么水,我却只做出来一道,实在不应该,还是写点东西吧…… A.sum 问题描述 给定一个数列,求是否存在连续子列和为m的倍数,存在输出YES,否则输出N ...
- Office Web Apps安装部署(一)
来源于:http://www.cnblogs.com/poissonnotes/p/3238238.html 系统要求为Windows Server 2012, 注意:安装Office Web App ...
- 10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'. '.' Matches any single character ...
- 3. JavaScript 数据类型
1. 主要类型 字符串(String).数字(Number).布尔(Boolean).数组(Array).对象(Object).空(Null).未定义(Undefined). JavaScript 拥 ...