Changeset View
Changeset View
Standalone View
Standalone View
head/sys/vm/vm_map.h
Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | struct vm_map_entry { | ||||
vm_prot_t max_protection; /* maximum protection */ | vm_prot_t max_protection; /* maximum protection */ | ||||
vm_inherit_t inheritance; /* inheritance */ | vm_inherit_t inheritance; /* inheritance */ | ||||
uint8_t read_ahead; /* pages in the read-ahead window */ | uint8_t read_ahead; /* pages in the read-ahead window */ | ||||
int wired_count; /* can be paged if = 0 */ | int wired_count; /* can be paged if = 0 */ | ||||
struct ucred *cred; /* tmp storage for creator ref */ | struct ucred *cred; /* tmp storage for creator ref */ | ||||
struct thread *wiring_thread; | struct thread *wiring_thread; | ||||
}; | }; | ||||
#define MAP_ENTRY_NOSYNC 0x0001 | #define MAP_ENTRY_NOSYNC 0x00000001 | ||||
#define MAP_ENTRY_IS_SUB_MAP 0x0002 | #define MAP_ENTRY_IS_SUB_MAP 0x00000002 | ||||
#define MAP_ENTRY_COW 0x0004 | #define MAP_ENTRY_COW 0x00000004 | ||||
#define MAP_ENTRY_NEEDS_COPY 0x0008 | #define MAP_ENTRY_NEEDS_COPY 0x00000008 | ||||
#define MAP_ENTRY_NOFAULT 0x0010 | #define MAP_ENTRY_NOFAULT 0x00000010 | ||||
#define MAP_ENTRY_USER_WIRED 0x0020 | #define MAP_ENTRY_USER_WIRED 0x00000020 | ||||
#define MAP_ENTRY_BEHAV_NORMAL 0x0000 /* default behavior */ | #define MAP_ENTRY_BEHAV_NORMAL 0x00000000 /* default behavior */ | ||||
#define MAP_ENTRY_BEHAV_SEQUENTIAL 0x0040 /* expect sequential access */ | #define MAP_ENTRY_BEHAV_SEQUENTIAL 0x00000040 /* expect sequential | ||||
#define MAP_ENTRY_BEHAV_RANDOM 0x0080 /* expect random access */ | access */ | ||||
#define MAP_ENTRY_BEHAV_RESERVED 0x00C0 /* future use */ | #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_VN_EXEC 0x0800 /* text vnode mapping */ | |||||
#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 | #ifdef _KERNEL | ||||
static __inline u_char | static __inline u_char | ||||
vm_map_entry_behavior(vm_map_entry_t entry) | vm_map_entry_behavior(vm_map_entry_t entry) | ||||
{ | { | ||||
return (entry->eflags & MAP_ENTRY_BEHAV_MASK); | return (entry->eflags & MAP_ENTRY_BEHAV_MASK); | ||||
} | } | ||||
static __inline int | static __inline int | ||||
▲ Show 20 Lines • Show All 171 Lines • ▼ Show 20 Lines | |||||
/* XXX: number of kernel maps to statically allocate */ | /* XXX: number of kernel maps to statically allocate */ | ||||
#define MAX_KMAP 10 | #define MAX_KMAP 10 | ||||
/* | /* | ||||
* Copy-on-write flags for vm_map operations | * Copy-on-write flags for vm_map operations | ||||
*/ | */ | ||||
#define MAP_INHERIT_SHARE 0x0001 | #define MAP_INHERIT_SHARE 0x00000001 | ||||
#define MAP_COPY_ON_WRITE 0x0002 | #define MAP_COPY_ON_WRITE 0x00000002 | ||||
#define MAP_NOFAULT 0x0004 | #define MAP_NOFAULT 0x00000004 | ||||
#define MAP_PREFAULT 0x0008 | #define MAP_PREFAULT 0x00000008 | ||||
#define MAP_PREFAULT_PARTIAL 0x0010 | #define MAP_PREFAULT_PARTIAL 0x00000010 | ||||
#define MAP_DISABLE_SYNCER 0x0020 | #define MAP_DISABLE_SYNCER 0x00000020 | ||||
#define MAP_CHECK_EXCL 0x0040 | #define MAP_CHECK_EXCL 0x00000040 | ||||
#define MAP_CREATE_GUARD 0x0080 | #define MAP_CREATE_GUARD 0x00000080 | ||||
#define MAP_DISABLE_COREDUMP 0x0100 | #define MAP_DISABLE_COREDUMP 0x00000100 | ||||
#define MAP_PREFAULT_MADVISE 0x0200 /* from (user) madvise request */ | #define MAP_PREFAULT_MADVISE 0x00000200 /* from (user) madvise request */ | ||||
#define MAP_VN_WRITECOUNT 0x0400 | #define MAP_VN_WRITECOUNT 0x00000400 | ||||
#define MAP_REMAP 0x0800 | #define MAP_REMAP 0x00000800 | ||||
#define MAP_STACK_GROWS_DOWN 0x1000 | #define MAP_STACK_GROWS_DOWN 0x00001000 | ||||
#define MAP_STACK_GROWS_UP 0x2000 | #define MAP_STACK_GROWS_UP 0x00002000 | ||||
#define MAP_ACC_CHARGED 0x4000 | #define MAP_ACC_CHARGED 0x00004000 | ||||
#define MAP_ACC_NO_CHARGE 0x8000 | #define MAP_ACC_NO_CHARGE 0x00008000 | ||||
#define MAP_CREATE_STACK_GAP_UP 0x10000 | #define MAP_CREATE_STACK_GAP_UP 0x00010000 | ||||
#define MAP_CREATE_STACK_GAP_DN 0x20000 | #define MAP_CREATE_STACK_GAP_DN 0x00020000 | ||||
#define MAP_VN_EXEC 0x40000 | #define MAP_VN_EXEC 0x00040000 | ||||
/* | /* | ||||
* vm_fault option flags | * vm_fault option flags | ||||
*/ | */ | ||||
#define VM_FAULT_NORMAL 0 /* Nothing special */ | #define VM_FAULT_NORMAL 0 /* Nothing special */ | ||||
#define VM_FAULT_WIRE 1 /* Wire the mapped page */ | #define VM_FAULT_WIRE 1 /* Wire the mapped page */ | ||||
#define VM_FAULT_DIRTY 2 /* Dirty the page; use w/VM_PROT_COPY */ | #define VM_FAULT_DIRTY 2 /* Dirty the page; use w/VM_PROT_COPY */ | ||||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |