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.hactually 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.hwhere the value is defined, so that when
linux/include/asm-generic/param.his 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?