Header files in the Linux kernel are used for two purposes:
- to define interfaces between components of the kernel, and
- to define interfaces between the kernel and user space
== Internal modules ==
Internal interfaces between modules are defined anywhere in below linux/include/ or linux/arch/*/include/. Interfaces between source files in a single module should be put into the same directory as the module source code, which avoids polluting the global header space.
== External modules ==