In userspace code, the macro __WORDSIZE is used, included in <bits/wordsize.h>. However, when I do Linux kernel programming, the __WORDSIZE seems not available.If <bits/wordsize.h> is included, it will receive a compile error, saying:error: bits/wordsize.h: No such file or directorybut if <bits/wordsize.h> is not included, it will receive another compile error, saying:error: __WORDSIZE undeclared.It seems that kernel programming doesn't support the <bits/wordsize.h> header file. What should I do to determine the wordsize in Linux kernel programming?P.S. my compiler version is gcc (GCC) 4.4.6.
How to determine the wordsize in Linux kernel programming?
linux;linux kernel;kernel modules;architecture;programming