Where is CONFIG_HZ defined? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election Results Why I closed the “Why is Kali so hard” questionLinux kernel headers' organizationCompile the Ubuntu “Raring” Kernel with the Intel CompilerHow is the linking mechanism so fast in the kernel system calls?why is “timer_t” defined in “time.h” on Linux but not OS XHow to add a system call in linux kernel 4.xHow does one establish SIGRTMIN at run-time?Anonymous Pipe Kernel Buffer SizeHow to get the actual program name using the PID of that running program?program stack sizeWhere is the default value of write_wakeup_threshold defined?
Antler Helmet: Can it work?
What would be the ideal power source for a cybernetic eye?
Are my PIs rude or am I just being too sensitive?
Can Pao de Queijo, and similar foods, be kosher for Passover?
How to deal with a team lead who never gives me credit?
Is high blood pressure ever a symptom attributable solely to dehydration?
Models of set theory where not every set can be linearly ordered
Is the address of a local variable a constexpr?
What are 'alternative tunings' of a guitar and why would you use them? Doesn't it make it more difficult to play?
How to motivate offshore teams and trust them to deliver?
Right-skewed distribution with mean equals to mode?
How do I mention the quality of my school without bragging
Letter Boxed validator
What does the "x" in "x86" represent?
Storing hydrofluoric acid before the invention of plastics
Did Xerox really develop the first LAN?
Does accepting a pardon have any bearing on trying that person for the same crime in a sovereign jurisdiction?
What is the longest distance a 13th-level monk can jump while attacking on the same turn?
How much radiation do nuclear physics experiments expose researchers to nowadays?
How can I fade player when goes inside or outside of the area?
Is a manifold-with-boundary with given interior and non-empty boundary essentially unique?
What happens to sewage if there is no river near by?
What is this single-engine low-wing propeller plane?
Gastric acid as a weapon
Where is CONFIG_HZ defined?
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionLinux kernel headers' organizationCompile the Ubuntu “Raring” Kernel with the Intel CompilerHow is the linking mechanism so fast in the kernel system calls?why is “timer_t” defined in “time.h” on Linux but not OS XHow to add a system call in linux kernel 4.xHow does one establish SIGRTMIN at run-time?Anonymous Pipe Kernel Buffer SizeHow to get the actual program name using the PID of that running program?program stack sizeWhere is the default value of write_wakeup_threshold defined?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm in the middle of reading the whole Linux 5.0.7 source code, and I've noticed something strange. I'll refer to linux
as the parent directory here, correct me if the community uses some other naming convention in the literature.
In the file linux/include/asm-generic/param.h
, the value CONFIG_HZ
is used. The value is not defined in the previous lines, and the only included file is uapi/asm-generic/param.h
. I believe this refers to linux/include/uapi/asm-generic/param.h
, again, correct me if I'm wrong.
In that file, no such value as CONFIG_HZ
is ever defined. Now, in your average C program, this would cause a bug. We have 3 options here:
- I misunderstood something and
linux/include/asm-generic/param.h
actually includes another file where the value IS defined. - This is a bug, and I am a genius for discovering it (least likely option).
- There is some "magic" going on, like some macros that Linux defines before, or some files the kernel includes before including
linux/include/asm-generic/param.h
where the value is defined, so that whenlinux/include/asm-generic/param.h
is called the value is already defined. In this case, please point me to what this file is.
If none of these is true, what is the reason why this is a correct C program?
linux linux-kernel
New contributor
add a comment |
I'm in the middle of reading the whole Linux 5.0.7 source code, and I've noticed something strange. I'll refer to linux
as the parent directory here, correct me if the community uses some other naming convention in the literature.
In the file linux/include/asm-generic/param.h
, the value CONFIG_HZ
is used. The value is not defined in the previous lines, and the only included file is uapi/asm-generic/param.h
. I believe this refers to linux/include/uapi/asm-generic/param.h
, again, correct me if I'm wrong.
In that file, no such value as CONFIG_HZ
is ever defined. Now, in your average C program, this would cause a bug. We have 3 options here:
- I misunderstood something and
linux/include/asm-generic/param.h
actually includes another file where the value IS defined. - This is a bug, and I am a genius for discovering it (least likely option).
- There is some "magic" going on, like some macros that Linux defines before, or some files the kernel includes before including
linux/include/asm-generic/param.h
where the value is defined, so that whenlinux/include/asm-generic/param.h
is called the value is already defined. In this case, please point me to what this file is.
If none of these is true, what is the reason why this is a correct C program?
linux linux-kernel
New contributor
add a comment |
I'm in the middle of reading the whole Linux 5.0.7 source code, and I've noticed something strange. I'll refer to linux
as the parent directory here, correct me if the community uses some other naming convention in the literature.
In the file linux/include/asm-generic/param.h
, the value CONFIG_HZ
is used. The value is not defined in the previous lines, and the only included file is uapi/asm-generic/param.h
. I believe this refers to linux/include/uapi/asm-generic/param.h
, again, correct me if I'm wrong.
In that file, no such value as CONFIG_HZ
is ever defined. Now, in your average C program, this would cause a bug. We have 3 options here:
- I misunderstood something and
linux/include/asm-generic/param.h
actually includes another file where the value IS defined. - This is a bug, and I am a genius for discovering it (least likely option).
- There is some "magic" going on, like some macros that Linux defines before, or some files the kernel includes before including
linux/include/asm-generic/param.h
where the value is defined, so that whenlinux/include/asm-generic/param.h
is called the value is already defined. In this case, please point me to what this file is.
If none of these is true, what is the reason why this is a correct C program?
linux linux-kernel
New contributor
I'm in the middle of reading the whole Linux 5.0.7 source code, and I've noticed something strange. I'll refer to linux
as the parent directory here, correct me if the community uses some other naming convention in the literature.
In the file linux/include/asm-generic/param.h
, the value CONFIG_HZ
is used. The value is not defined in the previous lines, and the only included file is uapi/asm-generic/param.h
. I believe this refers to linux/include/uapi/asm-generic/param.h
, again, correct me if I'm wrong.
In that file, no such value as CONFIG_HZ
is ever defined. Now, in your average C program, this would cause a bug. We have 3 options here:
- I misunderstood something and
linux/include/asm-generic/param.h
actually includes another file where the value IS defined. - This is a bug, and I am a genius for discovering it (least likely option).
- There is some "magic" going on, like some macros that Linux defines before, or some files the kernel includes before including
linux/include/asm-generic/param.h
where the value is defined, so that whenlinux/include/asm-generic/param.h
is called the value is already defined. In this case, please point me to what this file is.
If none of these is true, what is the reason why this is a correct C program?
linux linux-kernel
linux linux-kernel
New contributor
New contributor
New contributor
asked Apr 11 at 19:40
memememememememe
62
62
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Like other CONFIG_
values, CONFIG_HZ
is a configuration setting; you’ll find it in kernel/Kconfig.hz
, along with various arch-specific overrides in other Kconfig
files. Its value is determined during the build and stored in a generated configuration file, include/generated/autoconf.h
.
And I supposeinclude/generated/autoconf.h
is included in the kernel's execution flow beforelinux/include/asm-generic/param.h
?
– memememe
Apr 11 at 21:44
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
memememe is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f511983%2fwhere-is-config-hz-defined%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Like other CONFIG_
values, CONFIG_HZ
is a configuration setting; you’ll find it in kernel/Kconfig.hz
, along with various arch-specific overrides in other Kconfig
files. Its value is determined during the build and stored in a generated configuration file, include/generated/autoconf.h
.
And I supposeinclude/generated/autoconf.h
is included in the kernel's execution flow beforelinux/include/asm-generic/param.h
?
– memememe
Apr 11 at 21:44
add a comment |
Like other CONFIG_
values, CONFIG_HZ
is a configuration setting; you’ll find it in kernel/Kconfig.hz
, along with various arch-specific overrides in other Kconfig
files. Its value is determined during the build and stored in a generated configuration file, include/generated/autoconf.h
.
And I supposeinclude/generated/autoconf.h
is included in the kernel's execution flow beforelinux/include/asm-generic/param.h
?
– memememe
Apr 11 at 21:44
add a comment |
Like other CONFIG_
values, CONFIG_HZ
is a configuration setting; you’ll find it in kernel/Kconfig.hz
, along with various arch-specific overrides in other Kconfig
files. Its value is determined during the build and stored in a generated configuration file, include/generated/autoconf.h
.
Like other CONFIG_
values, CONFIG_HZ
is a configuration setting; you’ll find it in kernel/Kconfig.hz
, along with various arch-specific overrides in other Kconfig
files. Its value is determined during the build and stored in a generated configuration file, include/generated/autoconf.h
.
edited Apr 11 at 20:48
answered Apr 11 at 20:17
Stephen KittStephen Kitt
181k25415494
181k25415494
And I supposeinclude/generated/autoconf.h
is included in the kernel's execution flow beforelinux/include/asm-generic/param.h
?
– memememe
Apr 11 at 21:44
add a comment |
And I supposeinclude/generated/autoconf.h
is included in the kernel's execution flow beforelinux/include/asm-generic/param.h
?
– memememe
Apr 11 at 21:44
And I suppose
include/generated/autoconf.h
is included in the kernel's execution flow before linux/include/asm-generic/param.h
?– memememe
Apr 11 at 21:44
And I suppose
include/generated/autoconf.h
is included in the kernel's execution flow before linux/include/asm-generic/param.h
?– memememe
Apr 11 at 21:44
add a comment |
memememe is a new contributor. Be nice, and check out our Code of Conduct.
memememe is a new contributor. Be nice, and check out our Code of Conduct.
memememe is a new contributor. Be nice, and check out our Code of Conduct.
memememe is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f511983%2fwhere-is-config-hz-defined%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown