Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Mar 2014 14:23:55 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-current@freebsd.org
Cc:        Bruno =?iso-8859-1?q?Lauz=E9?= <brunolauze@msn.com>, Alan Cox <alc@freebsd.org>
Subject:   Re: vm_map.h
Message-ID:  <201403181423.55276.jhb@freebsd.org>
In-Reply-To: <BLU179-W590AB6C3D34C4FED71746C6710@phx.gbl>
References:  <BLU179-W51BFCABBB6A0019AB97DF9C6760@phx.gbl> <201403131400.59282.jhb@freebsd.org> <BLU179-W590AB6C3D34C4FED71746C6710@phx.gbl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, March 13, 2014 6:46:13 pm Bruno Lauz=E9 wrote:
> I suggesting this because it is used more ahead in the same file, but the=
 other way around is fine for me

No need to move them around:

Index: vm_map.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=2D-- vm_map.h	(revision 263302)
+++ vm_map.h	(working copy)
@@ -188,8 +188,10 @@ struct vm_map {
 	vm_flags_t flags;		/* flags for this vm_map */
 	vm_map_entry_t root;		/* Root of a binary search tree */
 	pmap_t pmap;			/* (c) Physical map */
+#ifdef _KERNEL
 #define	min_offset	header.start	/* (c) */
 #define	max_offset	header.end	/* (c) */
+#endif
 	int busy;
 };
=20
> ----------------------------------------
> > From: jhb@freebsd.org
> > To: freebsd-current@freebsd.org
> > Subject: Re: vm_map.h
> > Date: Thu, 13 Mar 2014 14:00:59 -0400
> > CC: brunolauze@msn.com; alc@freebsd.org
> >
> > On Wednesday, March 12, 2014 5:13:28 pm Bruno Lauz=E9 wrote:
> >> The two defines in vm/vm_map.h
> >>
> >> #define min_offset header.start /* (c) */
> >> #define max_offset header.end /* (c) */
> >>
> >>
> >> are really getting in the way because those words are most likely to b=
e used
> > downstream.
> >>
> >> I would suggest renaming those defines to:
> >>
> >> #define vm_min_offset header.start /* (c) */
> >> #define vm_max_offset header.end /* (c) */
> >>
> >> Am I missing something?
> >
> > A simpler fix is probably to put the #define's under #ifdef _KERNEL.
> >
> > --
> > John Baldwin

=2D-=20
John Baldwin



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