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.

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...
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to