The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/vm/vm_fault.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* 
    2  * Mach Operating System
    3  * Copyright (c) 1993-1987 Carnegie Mellon University
    4  * All Rights Reserved.
    5  * 
    6  * Permission to use, copy, modify and distribute this software and its
    7  * documentation is hereby granted, provided that both the copyright
    8  * notice and this permission notice appear in all copies of the
    9  * software, derivative works or modified versions, and any portions
   10  * thereof, and that both notices appear in supporting documentation.
   11  * 
   12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15  * 
   16  * Carnegie Mellon requests users of this software to return to
   17  * 
   18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19  *  School of Computer Science
   20  *  Carnegie Mellon University
   21  *  Pittsburgh PA 15213-3890
   22  * 
   23  * any improvements or extensions that they make and grant Carnegie Mellon
   24  * the rights to redistribute these changes.
   25  */
   26 /*
   27  * HISTORY
   28  * $Log:        vm_fault.h,v $
   29  * Revision 2.7  93/11/17  18:53:57  dbg
   30  *      Added vm_fault_noreturn.
   31  *      [93/10/21            dbg]
   32  * 
   33  *      Use no_return type for continuations.
   34  *      [93/05/04            dbg]
   35  * 
   36  *      Added ANSI function prototypes.
   37  *      [92/12/30            dbg]
   38  * 
   39  * Revision 2.6  91/05/18  14:40:15  rpd
   40  *      Added VM_FAULT_FICTITIOUS_SHORTAGE.
   41  *      [91/03/29            rpd]
   42  * 
   43  * Revision 2.5  91/05/14  17:48:59  mrt
   44  *      Correcting copyright
   45  * 
   46  * Revision 2.4  91/03/16  15:05:03  rpd
   47  *      Added vm_fault_init.
   48  *      [91/02/16            rpd]
   49  * 
   50  * Revision 2.3  91/02/05  17:58:12  mrt
   51  *      Changed to new Mach copyright
   52  *      [91/02/01  16:32:04  mrt]
   53  * 
   54  * Revision 2.2  90/02/22  20:05:32  dbg
   55  *      Add vm_fault_copy(), vm_fault_cleanup().  Remove
   56  *      vm_fault_copy_entry().
   57  *      [90/01/25            dbg]
   58  * 
   59  * Revision 2.1  89/08/03  16:44:57  rwd
   60  * Created.
   61  * 
   62  * Revision 2.6  89/04/18  21:25:22  mwyoung
   63  *      Reset history.
   64  *      [89/04/18            mwyoung]
   65  * 
   66  */
   67 /*
   68  *      File:   vm/vm_fault.h
   69  *
   70  *      Page fault handling module declarations.
   71  */
   72 
   73 #ifndef _VM_VM_FAULT_H_
   74 #define _VM_VM_FAULT_H_
   75 
   76 #include <mach/kern_return.h>
   77 #include <mach/vm_prot.h>
   78 #include <mach/machine/vm_types.h>
   79 #include <kern/kern_types.h>
   80 #include <vm/vm_map.h>
   81 #include <vm/vm_object.h>
   82 #include <vm/vm_page.h>
   83 
   84 
   85 /*
   86  *      Page fault handling based on vm_object only.
   87  */
   88 
   89 typedef kern_return_t   vm_fault_return_t;
   90 #define VM_FAULT_SUCCESS                0
   91 #define VM_FAULT_RETRY                  1
   92 #define VM_FAULT_INTERRUPTED            2
   93 #define VM_FAULT_MEMORY_SHORTAGE        3
   94 #define VM_FAULT_FICTITIOUS_SHORTAGE    4
   95 #define VM_FAULT_MEMORY_ERROR           5
   96 
   97 extern void vm_fault_init(void);
   98 
   99 extern vm_fault_return_t vm_fault_page(
  100         vm_object_t     first_object,
  101         vm_offset_t     first_offset,
  102         vm_prot_t       fault_type,
  103         boolean_t       must_be_resident,
  104         boolean_t       interruptible,
  105         vm_prot_t       *protection,    /* in/out */
  106         vm_page_t       *result_page,   /* out */
  107         vm_page_t       *top_page,      /* out */
  108         boolean_t       resume,
  109         continuation_t  continuation);
  110 
  111 extern void             vm_fault_cleanup(
  112         vm_object_t     object,
  113         vm_page_t       top_page);
  114 
  115 /*
  116  *      Page fault handling based on vm_map (or entries therein)
  117  */
  118 
  119 extern kern_return_t    vm_fault(
  120         vm_map_t        map,
  121         vm_offset_t     vaddr,
  122         vm_prot_t       fault_type,
  123         boolean_t       change_wiring,
  124         boolean_t       resume,
  125         no_return       (*continuation)(kern_return_t));
  126 
  127 extern void             vm_fault_wire(
  128         vm_map_t        map,
  129         vm_map_entry_t  entry);
  130 
  131 extern void             vm_fault_unwire(
  132         vm_map_t        map,
  133         vm_map_entry_t  entry);
  134 
  135 extern kern_return_t    vm_fault_copy(
  136         vm_object_t     src_object,
  137         vm_offset_t     src_offset,
  138         vm_size_t       *src_size,              /* in/out */
  139         vm_object_t     dst_object,
  140         vm_offset_t     dst_offset,
  141         vm_map_t        dst_map,
  142         vm_map_version_t *dst_version,
  143         boolean_t       interruptible);         /* Copy pages from
  144                                                  * one object to another
  145                                                  */
  146 /*
  147  *      Continuation routine in fault sequence.
  148  */
  149 extern no_return vm_fault_continue(void);
  150 
  151 /*
  152  *      Version of vm_fault to call when we want to
  153  *      make it clear that it will not return.
  154  */
  155 #define vm_fault_noreturn(m,v,ft,cw,r,c)                                \
  156         ((*(no_return (*)(vm_map_t, vm_offset_t, vm_prot_t,             \
  157                           boolean_t, boolean_t,                         \
  158                           no_return (*)(kern_return_t))) vm_fault       \
  159           )((m),(v),(ft),(cw),(r),(c)) )
  160 
  161 #endif  /* _VM_VM_FAULT_H_ */

Cache object: dcc336f75c41b4091d913c85ce7ce180


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.