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== ...
随机推荐
- 修改win7锁定界面背景
Regedit HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Authentication/LogonUI/Backgrou ...
- LeetCode OJ 78. Subsets
Given a set of distinct integers, nums, return all possible subsets. Note: Elements in a subset must ...
- sql优化原则
尽量使用性能高的比如left join等,尽量减少数据查询的column,尽量不要查询冗余数据,like的话“%%”是没有 办法使用索引的,但是“%”是可以使用索引的 having以前一直不知道到底真 ...
- E - 小晴天老师系列——我有一个数列!
E - 小晴天老师系列——我有一个数列! Time Limit: 20000/10000MS (Java/Others) Memory Limit: 128000/64000KB (Java/O ...
- 游戏客户端嵌入页面出白边bug
需要使用 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" > 这样的头部给页面才能去除与客 ...
- placeholder改变颜色
::-webkit-input-placeholder { /* WebKit browsers */ color: #cfcfcf; } :-moz-placeholder { /* Mozilla ...
- Codeforces 691D Swaps in Permutation
Time Limit:5000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Prac ...
- C# 读取二进制文件
using UnityEngine; using System.Collections; using System; using System.IO; public class Test : Mono ...
- ZUFE OJ 2288 God Wang I
Description God Wang 是ZUFE的神犇,有一天他想到一种神奇的变换,并且将它命名为GodW变换 对于一个数字n,该变换后的值GodW(n)为,先令X=n 第一步,如果X为个位数,G ...
- django搭建Bootstrap常用问题解决方法
1.进入页面,提示Creating a ModelForm without either the 'fields' attribute or the 'exclude'时 解决方法:打开forms.p ...