Date: Thu, 11 Nov 2010 20:37:27 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Andriy Gapon <avg@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215138 - in head/sys: net sys Message-ID: <4CDC45F7.8060506@FreeBSD.org> In-Reply-To: <4CDC43FE.6060401@freebsd.org> References: <201011111918.oABJIqvH081681@svn.freebsd.org> <4CDC43FE.6060401@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CDC45F7.8060506>