Le 24/02/2018 à 11:14, Martin Husemann a écrit :
On Fri, Feb 23, 2018 at 08:09:09AM +0100, Maxime Villard wrote:
... And? There is only one place where we use .if instead of #if, because there
is a good reason for doing so.
Which reason is that?
Well, look at the code. We want to control what gets compiled in the macro
with an argument.
SYSCALL_ENTRY syscall,is_svs=0
SYSCALL_ENTRY syscall_svs,is_svs=1
If the macro was defined as #if, you would need to do something like:
SYSCALL_ENTRY(syscall)
#define SYSCALL_ENTRY_SVS
SYSCALL_ENTRY(syscall_svs)
#undef SYSCALL_ENTRY_SVS
Where SYSCALL_ENTRY would contain another macro that depends on whether
SYSCALL_ENTRY_SVS is defined.
The second approach is the one that complexifies the code.
Maxime