2013-05-09 88 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接口值;

希望這會有所幫助。