编译内核代码,会定义宏 __KERNEL__
The kernel includes a set of headers that is exported to userspace. Many headers can be exported as-is but other headers require a minimal pre-processing before they are ready for user-space. The pre-processing does: - drop kernel-specific annotations - drop include of compiler.h - drop all sections that are kernel internal (guarded by `ifdef __KERNEL__`)