Re: vm_map.h

From: John Baldwin <jhb_at_freebsd.org>
Date: Tue, 18 Mar 2014 14:23:55 -0400
On Thursday, March 13, 2014 6:46:13 pm Bruno Lauzé 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
===================================================================
--- vm_map.h	(revision 263302)
+++ vm_map.h	(working copy)
_at__at_ -188,8 +188,10 _at__at_ 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;
 };
 
> ----------------------------------------
> > From: jhb_at_freebsd.org
> > To: freebsd-current_at_freebsd.org
> > Subject: Re: vm_map.h
> > Date: Thu, 13 Mar 2014 14:00:59 -0400
> > CC: brunolauze_at_msn.com; alc_at_freebsd.org
> >
> > On Wednesday, March 12, 2014 5:13:28 pm Bruno Lauzé 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 be 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

-- 
John Baldwin
Received on Tue Mar 18 2014 - 18:29:36 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:47 UTC