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/norma/xmm_interpose.c

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) 1991 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 
   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 the
   24  * rights to redistribute these changes.
   25  */
   26 /*
   27  * HISTORY
   28  * $Log:        xmm_interpose.c,v $
   29  * Revision 2.4  92/03/10  16:29:17  jsb
   30  *      Merged in norma branch changes as of NORMA_MK7.
   31  *      [92/03/09  12:51:23  jsb]
   32  * 
   33  * Revision 2.3.2.2  92/02/21  11:26:00  jsb
   34  *      Now xmm_kobj_link handles checks for multiple inits.
   35  *      [92/02/18  08:00:07  jsb]
   36  * 
   37  *      Explicitly provide name parameter to xmm_decl macro.
   38  *      Changed m_interpose_terminate to simply call M_TERMINATE instead of
   39  *      explicitly deallocating obj, since we now do real reference counting.
   40  *      [92/02/16  14:21:04  jsb]
   41  * 
   42  *      Use new xmm_decl, and new memory_object_name and deallocation protocol.
   43  *      [92/02/09  12:54:10  jsb]
   44  * 
   45  * Revision 2.3.2.1  92/01/21  21:54:19  jsb
   46  *      De-linted. Supports new (dlb) memory object routines.
   47  *      Supports arbitrary reply ports to lock_request, etc.
   48  *      Converted mach_port_t (and port_t) to ipc_port_t.
   49  *      [92/01/20  17:23:15  jsb]
   50  * 
   51  * Revision 2.3  91/07/01  08:26:16  jsb
   52  *      Collect garbage. Return valid return values.
   53  *      [91/06/29  15:31:20  jsb]
   54  * 
   55  * Revision 2.2  91/06/17  15:48:21  jsb
   56  *      First checkin.
   57  *      [91/06/17  11:08:05  jsb]
   58  * 
   59  */
   60 /*
   61  *      File:   norma/xmm_interpose.c
   62  *      Author: Joseph S. Barrera III
   63  *      Date:   1991
   64  *
   65  *      Definitions for null instances of xmm functions.
   66  */
   67 
   68 #ifdef  KERNEL
   69 #include <norma/xmm_obj.h>
   70 #else   KERNEL
   71 #include <xmm_obj.h>
   72 #endif  KERNEL
   73 
   74 xmm_decl(interpose, "interpose", sizeof(struct xmm_obj));
   75 
   76 m_interpose_init(mobj, k_kobj, pagesize, internal, size)
   77         xmm_obj_t mobj;
   78         xmm_obj_t k_kobj;
   79         vm_size_t pagesize;
   80         boolean_t internal;
   81         vm_size_t size;
   82 {
   83         xmm_obj_t kobj = mobj;
   84 
   85         xmm_kobj_link(kobj, k_kobj);
   86         return M_INIT(mobj, kobj, pagesize, internal, size);
   87 }
   88 
   89 m_interpose_terminate(mobj, kobj)
   90         xmm_obj_t mobj;
   91         xmm_obj_t kobj;
   92 {
   93         return M_TERMINATE(mobj, kobj);
   94 }
   95 
   96 void
   97 m_interpose_deallocate(mobj)
   98         xmm_obj_t mobj;
   99 {
  100 }
  101 
  102 m_interpose_copy(mobj, kobj, offset, length, new_mobj)
  103         xmm_obj_t mobj;
  104         xmm_obj_t kobj;
  105         vm_offset_t offset;
  106         vm_size_t length;
  107         xmm_obj_t new_mobj;
  108 {
  109         return M_COPY(mobj, kobj, offset, length, new_mobj);
  110 }
  111 
  112 m_interpose_data_request(mobj, kobj, offset, length, desired_access)
  113         xmm_obj_t mobj;
  114         xmm_obj_t kobj;
  115         vm_offset_t offset;
  116         vm_size_t length;
  117         vm_prot_t desired_access;
  118 {
  119         return M_DATA_REQUEST(mobj, kobj, offset, length, desired_access);
  120 }
  121 
  122 m_interpose_data_unlock(mobj, kobj, offset, length, desired_access)
  123         xmm_obj_t mobj;
  124         xmm_obj_t kobj;
  125         vm_offset_t offset;
  126         vm_size_t length;
  127         vm_prot_t desired_access;
  128 {
  129         return M_DATA_UNLOCK(mobj, kobj, offset, length, desired_access);
  130 }
  131 
  132 m_interpose_data_write(mobj, kobj, offset, data, length)
  133         xmm_obj_t mobj;
  134         xmm_obj_t kobj;
  135         vm_offset_t offset;
  136         vm_offset_t data;
  137         vm_size_t length;
  138 {
  139         return M_DATA_WRITE(mobj, kobj, offset, data, length);
  140 }
  141 
  142 m_interpose_lock_completed(reply, offset, length)
  143         xmm_reply_t reply;
  144         vm_offset_t offset;
  145         vm_size_t length;
  146 {
  147         return M_LOCK_COMPLETED(reply, offset, length);
  148 }
  149 
  150 m_interpose_supply_completed(reply, offset, length, result, error_offset)
  151         xmm_reply_t reply;
  152         vm_offset_t offset;
  153         vm_size_t length;
  154         kern_return_t result;
  155         vm_offset_t error_offset;
  156 {
  157         return M_SUPPLY_COMPLETED(reply, offset, length, result, error_offset);
  158 }
  159 
  160 m_interpose_data_return(mobj, kobj, offset, data, length)
  161         xmm_obj_t mobj;
  162         xmm_obj_t kobj;
  163         vm_offset_t offset;
  164         vm_offset_t data;
  165         vm_size_t length;
  166 {
  167         return M_DATA_RETURN(mobj, kobj, offset, data, length);
  168 }
  169 
  170 m_interpose_change_completed(reply, may_cache, copy_strategy)
  171         xmm_reply_t reply;
  172         boolean_t may_cache;
  173         memory_object_copy_strategy_t copy_strategy;
  174 {
  175         return M_CHANGE_COMPLETED(reply, may_cache, copy_strategy);
  176 }
  177 
  178 k_interpose_data_unavailable(kobj, offset, length)
  179         xmm_obj_t kobj;
  180         vm_offset_t offset;
  181         vm_size_t length;
  182 {
  183         return K_DATA_UNAVAILABLE(kobj, offset, length);
  184 }
  185 
  186 k_interpose_get_attributes(kobj, object_ready, may_cache, copy_strategy)
  187         xmm_obj_t kobj;
  188         boolean_t *object_ready;
  189         boolean_t *may_cache;
  190         memory_object_copy_strategy_t *copy_strategy;
  191 {
  192         return K_GET_ATTRIBUTES(kobj, object_ready, may_cache, copy_strategy);
  193 }
  194 
  195 k_interpose_lock_request(kobj, offset, length, should_clean, should_flush,
  196                          lock_value, reply)
  197         xmm_obj_t kobj;
  198         vm_offset_t offset;
  199         vm_size_t length;
  200         boolean_t should_clean;
  201         boolean_t should_flush;
  202         vm_prot_t lock_value;
  203         xmm_reply_t reply;
  204 {
  205         return K_LOCK_REQUEST(kobj, offset, length, should_clean, should_flush,
  206                               lock_value, reply);
  207 }
  208 
  209 k_interpose_data_error(kobj, offset, length, error_value)
  210         xmm_obj_t kobj;
  211         vm_offset_t offset;
  212         vm_size_t length;
  213         kern_return_t error_value;
  214 {
  215         return K_DATA_ERROR(kobj, offset, length, error_value);
  216 }
  217 
  218 k_interpose_set_ready(kobj, object_ready, may_cache, copy_strategy,
  219                       use_old_pageout, memory_object_name, reply)
  220         xmm_obj_t kobj;
  221         boolean_t object_ready;
  222         boolean_t may_cache;
  223         memory_object_copy_strategy_t copy_strategy;
  224         boolean_t use_old_pageout;
  225         ipc_port_t memory_object_name;
  226         xmm_reply_t reply;
  227 {
  228         return K_SET_READY(kobj, object_ready, may_cache, copy_strategy,
  229                            use_old_pageout, memory_object_name, reply);
  230 }
  231 
  232 k_interpose_destroy(kobj, reason)
  233         xmm_obj_t kobj;
  234         kern_return_t reason;
  235 {
  236         return K_DESTROY(kobj, reason);
  237 }
  238 
  239 k_interpose_data_supply(kobj, offset, data, length, lock_value, precious,
  240                         reply)
  241         xmm_obj_t kobj;
  242         vm_offset_t offset;
  243         vm_offset_t data;
  244         vm_size_t length;
  245         vm_prot_t lock_value;
  246         boolean_t precious;
  247         xmm_reply_t reply;
  248 {
  249         return K_DATA_SUPPLY(kobj, offset, data, length, lock_value, precious,
  250                              reply);
  251 }

Cache object: ec491d93db31d26b1a9b470bce88d613


[ 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.