Re: linux-2.5.7

Alexander Viro (viro@math.psu.edu)
Sun, 31 Mar 2002 03:42:20 -0500 (EST)


On Sun, 31 Mar 2002, Andrew Morton wrote:

> Could you remind us what problem this is solving? The
> #ifdef approach seemed reasonable and there's no indication
> here why weak linkage is needed.

The thing we want here _is_ weak linkage - "return -ENOSYS unless
you have the real thing". You can emulate that with ifdefs,
but that's what it is - emulation. IOW, what we want actually
belongs to linker, not compiler.

When file looks like

#ifdef FOO
<lots of stuff>
<function calling that stuff>
#else
<make that function an equivalent of sys_ni_syscall()>
#endif

we are really talking about "make it an alias of sys_ni_syscall() and let
<all this stuff> override that".

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/