Messages in this thread | | | Date | Thu, 20 Mar 2003 12:01:57 -0500 | From | Chris Friesen <> | Subject | Re: Non-__init functions calling __init functions |
| |
Andrzej Krzysztofowicz wrote:
> Not always possible. > > __init A() { > ... > } > > __exit B() { > ... > } > > C() { > ... > A(); > ... > #ifdef MODULE > B(); > #endif > ... > } > > C cannot be marked __init for #define MODULE case. Even if it is called only > by some __init code. I can imagine other similar situations.
I thought that in the case of modules, __init is a noop? At least, that's what this page says
http://www.netfilter.org/unreliable-guides/kernel-hacking/routines-init.html
So if MODULE is defined, it doesn't matter if C is labelled as __init or not, and if it is not defined, it *should* be labelled as __init since it is itself calling __init code.
Chris
-- Chris Friesen | MailStop: 043/33/F10 Nortel Networks | work: (613) 765-0557 3500 Carling Avenue | fax: (613) 765-2986 Nepean, ON K2H 8E9 Canada | email: cfriesen@nortelnetworks.com
- 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/
| |