on 11/11/2010 21:37 Dimitry Andric said the following: > On 2010-11-11 20:29, Andriy Gapon wrote: >> Do I understand it correctly that set_pcpu section itself would not be >> produced if >> DPCPU_DEFINE() is not actually used? > > Yes, although currently this does not occur in any kernel module (I > tested using make universe). But indeed, if you would include e.g. > vnet.h or pcpu.h, but did not use any VNET_DEFINE or DPCPU_DEFINE > macros, you would get an error during linking.
Either I am confused or there is something wrong. I think that we have plenty of modules that do not use DPCPU_DEFINE, but source files of which do include pcpu.h. > The proper fix for this is to use the __GLOBL macros only when actually > invoking the VNET_DEFINE or DPCPU_DEFINE macros, just as with the > __MAKE_SET macro. But this is made more difficult by the fact that many > invocations of VNET_DEFINE and DPCPU_DEFINE are either prefixed with > 'static', or postfixed with '= literal_value'. > > Maybe we could use separate VNET_DEFINE_STATIC and DPCPU_DEFINE_STATIC > macros for this, since it looks like some of the definitions actually > define public variables... -- Andriy Gapon _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"