Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Nov 2010 08:57:49 +0200
From:      Andriy Gapon <avg@freebsd.org>
To:        Dimitry Andric <dim@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:  <4CDCE56D.9050007@freebsd.org>
In-Reply-To: <4CDC45F7.8060506@FreeBSD.org>
References:  <201011111918.oABJIqvH081681@svn.freebsd.org> <4CDC43FE.6060401@freebsd.org> <4CDC45F7.8060506@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CDCE56D.9050007>