2013-05-09 27 views
2

我目前正在寻找到的WiFi内核源代码(网/ mac80211) (三星的Galaxy S3 --- GT-I9300 ---内核)的Android(Linux)的内核 'HZ' 变量

而且我见过像下面的代码:

/* 
* Scanning implementation 
* 
* Copyright 2003, Jouni Malinen <[email protected]> 
* Copyright 2004, Instant802 Networks, Inc. 
* Copyright 2005, Devicescape Software, Inc. 
* Copyright 2006-2007 Jiri Benc <[email protected]> 
* Copyright 2007, Michael Wu <[email protected]> 
* 
* This program is free software; you can redistribute it and/or modify 
* it under the terms of the GNU General Public License version 2 as 
* published by the Free Software Foundation. 
*/ 

#include <linux/if_arp.h> 
#include <linux/rtnetlink.h> 
#include <linux/pm_qos_params.h> 
#include <net/sch_generic.h> 
#include <linux/slab.h> 
#include <net/mac80211.h> 

#include "ieee80211_i.h" 
#include "driver-ops.h" 
#include "mesh.h" 

#define IEEE80211_PROBE_DELAY (HZ/33) 
#define IEEE80211_CHANNEL_TIME (HZ/33) 
#define IEEE80211_PASSIVE_CHANNEL_TIME (HZ/8) 

在代码的底部,它定义PROBE_DELAY,CHANNEL_TIME,PASSIVE_CHANNEL_TIME相对于变量“HZ”

因此,我输入grep -r "HZ" ./ >> ~/grep_result找到的地方HZ被定义。

但是,结果没有HZ的定义,声明。

我在哪里可以找到HZ的确切值?

如果我找到HZ值,那么单位的度量是多少?

回答

3

HZ通常定义为CONFIG_HZ。 CONFIG_HZ是在make config过程定义

通用的定义是在

包括/ ASM-通用/ param.h;

的特定结构定义在

拱//包括/ ASM/param.h

这往往简单地定义它是作为CONFIG_HZ好;请注意,你可能会发现HZ的一些硬编码的定义,//包括/ ASM/uapi/param.h

HZ的这些定义不使用

拱内核它们是用户空间API接口值;

希望这会有所帮助。