Date: Tue, 11 Jun 2019 10:41:39 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r348898 - stable/12/sys/vm Message-ID: <201906111041.x5BAfdMn096283@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Tue Jun 11 10:41:39 2019 New Revision: 348898 URL: https://svnweb.freebsd.org/changeset/base/348898 Log: MFC r348816: Style MAP_ENTRY_ and MAP_ definitions. For this MFC, I am also adding MAP_ENTRY_VN_EXEC MAP_ENTRY and MAP_VN_EXEC, since this route seems to cause less future conflicts. Modified: stable/12/sys/vm/vm_map.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/vm_map.h ============================================================================== --- stable/12/sys/vm/vm_map.h Tue Jun 11 10:04:04 2019 (r348897) +++ stable/12/sys/vm/vm_map.h Tue Jun 11 10:41:39 2019 (r348898) @@ -120,34 +120,38 @@ struct vm_map_entry { struct thread *wiring_thread; }; -#define MAP_ENTRY_NOSYNC 0x0001 -#define MAP_ENTRY_IS_SUB_MAP 0x0002 -#define MAP_ENTRY_COW 0x0004 -#define MAP_ENTRY_NEEDS_COPY 0x0008 -#define MAP_ENTRY_NOFAULT 0x0010 -#define MAP_ENTRY_USER_WIRED 0x0020 +#define MAP_ENTRY_NOSYNC 0x00000001 +#define MAP_ENTRY_IS_SUB_MAP 0x00000002 +#define MAP_ENTRY_COW 0x00000004 +#define MAP_ENTRY_NEEDS_COPY 0x00000008 +#define MAP_ENTRY_NOFAULT 0x00000010 +#define MAP_ENTRY_USER_WIRED 0x00000020 -#define MAP_ENTRY_BEHAV_NORMAL 0x0000 /* default behavior */ -#define MAP_ENTRY_BEHAV_SEQUENTIAL 0x0040 /* expect sequential access */ -#define MAP_ENTRY_BEHAV_RANDOM 0x0080 /* expect random access */ -#define MAP_ENTRY_BEHAV_RESERVED 0x00C0 /* future use */ +#define MAP_ENTRY_BEHAV_NORMAL 0x00000000 /* default behavior */ +#define MAP_ENTRY_BEHAV_SEQUENTIAL 0x00000040 /* expect sequential + access */ +#define MAP_ENTRY_BEHAV_RANDOM 0x00000080 /* expect random + access */ +#define MAP_ENTRY_BEHAV_RESERVED 0x000000c0 /* future use */ +#define MAP_ENTRY_BEHAV_MASK 0x000000c0 +#define MAP_ENTRY_IN_TRANSITION 0x00000100 /* entry being + changed */ +#define MAP_ENTRY_NEEDS_WAKEUP 0x00000200 /* waiters in + transition */ +#define MAP_ENTRY_NOCOREDUMP 0x00000400 /* don't include in + a core */ +#define MAP_ENTRY_VN_EXEC 0x00000800 /* text vnode mapping */ +#define MAP_ENTRY_GROWS_DOWN 0x00001000 /* top-down stacks */ +#define MAP_ENTRY_GROWS_UP 0x00002000 /* bottom-up stacks */ -#define MAP_ENTRY_BEHAV_MASK 0x00C0 +#define MAP_ENTRY_WIRE_SKIPPED 0x00004000 +#define MAP_ENTRY_VN_WRITECNT 0x00008000 /* writeable vnode + mapping */ +#define MAP_ENTRY_GUARD 0x00010000 +#define MAP_ENTRY_STACK_GAP_DN 0x00020000 +#define MAP_ENTRY_STACK_GAP_UP 0x00040000 +#define MAP_ENTRY_HEADER 0x00080000 -#define MAP_ENTRY_IN_TRANSITION 0x0100 /* entry being changed */ -#define MAP_ENTRY_NEEDS_WAKEUP 0x0200 /* waiters in transition */ -#define MAP_ENTRY_NOCOREDUMP 0x0400 /* don't include in a core */ - -#define MAP_ENTRY_GROWS_DOWN 0x1000 /* Top-down stacks */ -#define MAP_ENTRY_GROWS_UP 0x2000 /* Bottom-up stacks */ - -#define MAP_ENTRY_WIRE_SKIPPED 0x4000 -#define MAP_ENTRY_VN_WRITECNT 0x8000 /* writeable vnode mapping */ -#define MAP_ENTRY_GUARD 0x10000 -#define MAP_ENTRY_STACK_GAP_DN 0x20000 -#define MAP_ENTRY_STACK_GAP_UP 0x40000 -#define MAP_ENTRY_HEADER 0x80000 - #ifdef _KERNEL static __inline u_char vm_map_entry_behavior(vm_map_entry_t entry) @@ -335,24 +339,25 @@ long vmspace_resident_count(struct vmspace *vmspace); /* * Copy-on-write flags for vm_map operations */ -#define MAP_INHERIT_SHARE 0x0001 -#define MAP_COPY_ON_WRITE 0x0002 -#define MAP_NOFAULT 0x0004 -#define MAP_PREFAULT 0x0008 -#define MAP_PREFAULT_PARTIAL 0x0010 -#define MAP_DISABLE_SYNCER 0x0020 -#define MAP_CHECK_EXCL 0x0040 -#define MAP_CREATE_GUARD 0x0080 -#define MAP_DISABLE_COREDUMP 0x0100 -#define MAP_PREFAULT_MADVISE 0x0200 /* from (user) madvise request */ -#define MAP_VN_WRITECOUNT 0x0400 -#define MAP_REMAP 0x0800 -#define MAP_STACK_GROWS_DOWN 0x1000 -#define MAP_STACK_GROWS_UP 0x2000 -#define MAP_ACC_CHARGED 0x4000 -#define MAP_ACC_NO_CHARGE 0x8000 -#define MAP_CREATE_STACK_GAP_UP 0x10000 -#define MAP_CREATE_STACK_GAP_DN 0x20000 +#define MAP_INHERIT_SHARE 0x00000001 +#define MAP_COPY_ON_WRITE 0x00000002 +#define MAP_NOFAULT 0x00000004 +#define MAP_PREFAULT 0x00000008 +#define MAP_PREFAULT_PARTIAL 0x00000010 +#define MAP_DISABLE_SYNCER 0x00000020 +#define MAP_CHECK_EXCL 0x00000040 +#define MAP_CREATE_GUARD 0x00000080 +#define MAP_DISABLE_COREDUMP 0x00000100 +#define MAP_PREFAULT_MADVISE 0x00000200 /* from (user) madvise request */ +#define MAP_VN_WRITECOUNT 0x00000400 +#define MAP_REMAP 0x00000800 +#define MAP_STACK_GROWS_DOWN 0x00001000 +#define MAP_STACK_GROWS_UP 0x00002000 +#define MAP_ACC_CHARGED 0x00004000 +#define MAP_ACC_NO_CHARGE 0x00008000 +#define MAP_CREATE_STACK_GAP_UP 0x00010000 +#define MAP_CREATE_STACK_GAP_DN 0x00020000 +#define MAP_VN_EXEC 0x00040000 /* * vm_fault option flags
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906111041.x5BAfdMn096283>