[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
using #define preprocessor
i read through some kernel codes and notice the use of
#define
i was wondering whether i can made use of it in the
way described below
i want to write a module called MYMODULE
in this module i define: #define mymodule
so in the kernel codes, i want to add in some
conditions
#ifdef mymodule
blah
blah
#endif
the codes will only be run if MYMODULE has been loaded
else, the codes won't run.
is what i described above possible?
how can it be done?
Thanks
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.surriel.com/kernelnewbies.shtml