Page MenuHomeFreeBSD

D52567.id162131.diff
No OneTemporary

D52567.id162131.diff

diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -708,21 +708,18 @@
#endif
/*
- * vm_fault_trap:
+ * vm_fault_trap:
*
- * Handle a page fault occurring at the given address,
- * requiring the given permissions, in the map specified.
- * If successful, the page is inserted into the
- * associated physical map.
+ * Helper for the page fault trap handlers, wrapping vm_fault().
+ * Issues ktrace points for the faults.
*
- * NOTE: the given address should be truncated to the
- * proper page address.
+ * If fault cannot be handled successfully by satisfying the required
+ * mapping, and the faulted instruction cannot be restarted, the
+ * signal number and si_code values are returned for trapsignal() to
+ * deliver.
*
- * KERN_SUCCESS is returned if the page fault is handled; otherwise,
- * a standard error specifying why the fault is fatal is returned.
- *
- * The map in question must be referenced, and remains so.
- * Caller may hold no locks.
+ * Returns Mach error codes, but callers should only check for
+ * KERN_SUCCESS.
*/
int
vm_fault_trap(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type,
@@ -1626,6 +1623,22 @@
return (res);
}
+/*
+ * vm_fault:
+ *
+ * Handle a page fault occurring at the given address, requiring the
+ * given permissions, in the map specified. If successful, the page
+ * is inserted into the associated physical map.
+ *
+ * The given address should be truncated to the proper page address.
+ *
+ * KERN_SUCCESS is returned if the page fault is handled; otherwise, a
+ * Mach error specifying why the fault is fatal is returned.
+ *
+ * The map in question must be alive, either being the map for current
+ * process, or the owner process hold count incremented to prevent
+ * exit(). Caller may hold no locks.
+ */
int
vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type,
int fault_flags, vm_page_t *m_hold)

File Metadata

Mime Type
text/plain
Expires
Sun, Jul 12, 9:34 PM (2 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35012800
Default Alt Text
D52567.id162131.diff (1 KB)

Event Timeline