Originally Posted by nithima
What is the meaning of using "__KERNEL__" and "MODULE" macro
macros are used by some header files to determine which definitions to provide.
Some library headers will provide extra access to kernel level code, hence the __KERNEL__
And some kernel headers will differ depending on whether you are compiling kernel module code or directly linked kernel code, hence the MODULE
Where these macros are not defined in a module's code, they are usually defined in the gcc
line that compiles the code.