Generally speaking, if we want to use current macro in Linux kernel, we should:
#include <asm/current.h>
but there is a asm-generic version:
#include <asm-generic/current.h>
the asm version implements the current macro through per-cpu variable, but asm-generic version implements the current macro through thread_info, these two are totally different. Linux kernel headers' organization says we should use asm version, which include asm/current.h, but so many blogs or books says x86 use asm-generic version to implement current macro, including Linux Kernel Development, 3rd, 3 Process Management, Storing the Process Descriptor. So, which version the x86 Linux kernel really use, asm or asm-generic? How could I make sure which version the Linux kernel really use?