svn commit: r295226 - head/lib/libmemstat

Gleb Smirnoff glebius at FreeBSD.org
Mon Feb 8 22:50:47 UTC 2016


On Mon, Feb 08, 2016 at 01:21:18PM -0800, John Baldwin wrote:
J> On Thursday, February 04, 2016 09:06:03 AM Gleb Smirnoff wrote:
J> > On Wed, Feb 03, 2016 at 04:41:26PM -0800, Bryan Drewery wrote:
J> > B> On 2/3/2016 4:23 PM, Gleb Smirnoff wrote:
J> > B> > Author: glebius
J> > B> > Date: Thu Feb  4 00:23:21 2016
J> > B> > New Revision: 295226
J> > B> > URL: https://svnweb.freebsd.org/changeset/base/295226
J> > B> > 
J> > B> > Log:
J> > B> >   Fix build.
J> > B> > 
J> > B> > Modified:
J> > B> >   head/lib/libmemstat/memstat_uma.c
J> > B> > 
J> > B> > Modified: head/lib/libmemstat/memstat_uma.c
J> > B> > ==============================================================================
J> > B> > --- head/lib/libmemstat/memstat_uma.c	Wed Feb  3 23:41:58 2016	(r295225)
J> > B> > +++ head/lib/libmemstat/memstat_uma.c	Thu Feb  4 00:23:21 2016	(r295226)
J> > B> > @@ -29,6 +29,7 @@
J> > B> >  #include <sys/param.h>
J> > B> >  #include <sys/cpuset.h>
J> > B> >  #include <sys/sysctl.h>
J> > B> > +#include <sys/_task.h>
J> > B> >  
J> > B> >  #include <vm/vm.h>
J> > B> >  #include <vm/vm_page.h>
J> > B> > 
J> > B> 
J> > B> Shouldn't uma_int.h forward declare or include _task.h for struct task?
J> > 
J> > Forward declaration won't work, since structure is included, not pointed at.
J> > I'm reluctant with adding includes into includes.
J> 
J> The sys/_foo.h headers are specifically designed so they can be used as nested
J> includes while (hopefully) introducing minimal pollution.  If you are embedding
J> struct task in a structure, use a nested include of <sys/_task.h>.  That is
J> why <sys/_task.h> exists as a separate header from <sys/taskqueue.h>.

Thanks, John. Will try to fixup that now.

-- 
Totus tuus, Glebius.


More information about the svn-src-head mailing list