I am now studying about the implementation of page table of Linux 2.6.38.8. In linux/include/linux/syscall.c
, I found that
#define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
but I don't fully understand what this piece of code is doing. There are some branches for
SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
and their definition, but开发者_StackOverflow社区 the code is quite complicated to understand for me. If anyone know about this implementation, teach me please.
Basically SYSCALL_DEFINE is defined by another define which is called SYSCALL_DEFINEx. In addition it used string concatenation to build the second parameter, which is the same name preceded by the "_" character. In addition it uses VA_ARGS (this is a c99 feature) which passes all the specified parameters to the SYSCALL_DEFINEx macro.
精彩评论