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_invalid.c

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
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_invalid.c,v $
   29  * Revision 2.5  92/03/10  16:29:20  jsb
   30  *      Merged in norma branch changes as of NORMA_MK7.
   31  *      [92/03/09  12:51:26  jsb]
   32  * 
   33  * Revision 2.4.2.2  92/02/21  11:26:03  jsb
   34  *      Explicitly provide name parameter to xmm_decl macro.
   35  *      [92/02/16  14:21:46  jsb]
   36  * 
   37  *      Use new xmm_decl, and new memory_object_name and deallocation protocol.
   38  *      [92/02/09  13:56:31  jsb]
   39  * 
   40  * Revision 2.4.2.1  92/01/21  21:54:23  jsb
   41  *      De-linted. Supports new (dlb) memory object routines.
   42  *      Supports arbitrary reply ports to lock_request, etc.
   43  *      Converted mach_port_t (and port_t) to ipc_port_t.
   44  *      [92/01/20  17:23:35  jsb]
   45  * 
   46  * Revision 2.4  91/12/10  13:26:26  jsb
   47  *      Added better debugging support to xmm_invalid_complain.
   48  *      [91/12/10  12:46:26  jsb]
   49  * 
   50  * Revision 2.3  91/07/01  08:26:20  jsb
   51  *      Added declaration of invalid_mclass, for debugging use.
   52  *      [91/06/29  15:32:54  jsb]
   53  * 
   54  * Revision 2.2  91/06/17  15:48:26  jsb
   55  *      First checkin.
   56  *      [91/06/17  11:03:08  jsb]
   57  * 
   58  */
   59 /*
   60  *      File:   norma/xmm_invalid.c
   61  *      Author: Joseph S. Barrera III
   62  *      Date:   1991
   63  *
   64  *      Definitions for invalid instances of xmm functions.
   65  */
   66 
   67 #ifdef  KERNEL
   68 #include <norma/xmm_obj.h>
   69 #else   KERNEL
   70 #include <xmm_obj.h>
   71 #endif  KERNEL
   72 
   73 xmm_decl(invalid, "invalid", 0);
   74 
   75 xmm_invalid_complain(name, from, to)
   76         char *name;
   77         xmm_obj_t from;
   78         xmm_obj_t to;
   79 {
   80         panic("xmm_invalid_complain(%s,0x%x,0x%x)", name, from, to);
   81 #if 000
   82         printf("m_invalid_%s from xmm_%s to xmm_%s\n",
   83                name, from->k_kobj->class->c_name, to->class->c_name);
   84         if ((int) from->refcount < -1000 || (int) from->refcount > 1000) {
   85                 printf("deallocated! 0x%x/0x%x=%s/0x%x\n",
   86                        from->k_kobj,
   87                        from,
   88                        (char *) from->refcount,
   89                        to);
   90         }
   91 #endif
   92         return KERN_FAILURE;
   93 }
   94 
   95 xmm_invalid_complain_reply(name, reply)
   96         char *name;
   97         xmm_reply_t reply;
   98 {
   99         panic("xmm_invalid_complain(%s,0x%x)", name, reply);
  100         /* XXX could print more info here */
  101         return KERN_FAILURE;
  102 }
  103 
  104 m_invalid_init(mobj, k_kobj, pagesize, internal, size)
  105         xmm_obj_t mobj;
  106         xmm_obj_t k_kobj;
  107         vm_size_t pagesize;
  108         boolean_t internal;
  109         vm_size_t size;
  110 {
  111 #ifdef  lint
  112         M_INIT(mobj, k_kobj, pagesize, internal, size);
  113 #endif  lint
  114         printf("m_invalid_init from xmm_%s to xmm_%s\n",
  115                k_kobj->class->c_name, mobj->class->c_name);
  116         return KERN_FAILURE;
  117 }
  118 
  119 m_invalid_terminate(mobj, kobj)
  120         xmm_obj_t mobj;
  121         xmm_obj_t kobj;
  122 {
  123 #ifdef  lint
  124         M_TERMINATE(mobj, kobj);
  125 #endif  lint
  126         return xmm_invalid_complain("terminate", kobj, mobj);
  127 }
  128 
  129 void
  130 m_invalid_deallocate(mobj)
  131         xmm_obj_t mobj;
  132 {
  133         panic("m_invalid_deallocate");
  134 }
  135 
  136 m_invalid_copy(mobj, kobj, offset, length, new_mobj)
  137         xmm_obj_t mobj;
  138         xmm_obj_t kobj;
  139         vm_offset_t offset;
  140         vm_size_t length;
  141         xmm_obj_t new_mobj;
  142 {
  143 #ifdef  lint
  144         M_COPY(mobj, kobj, offset, length, new_mobj);
  145 #endif  lint
  146         return xmm_invalid_complain("copy", kobj, mobj);
  147 }
  148 
  149 m_invalid_data_request(mobj, kobj, offset, length, desired_access)
  150         xmm_obj_t mobj;
  151         xmm_obj_t kobj;
  152         vm_offset_t offset;
  153         vm_size_t length;
  154         vm_prot_t desired_access;
  155 {
  156 #ifdef  lint
  157         M_DATA_REQUEST(mobj, kobj, offset, length, desired_access);
  158 #endif  lint
  159         return xmm_invalid_complain("data_request", kobj, mobj);
  160 }
  161 
  162 m_invalid_data_unlock(mobj, kobj, offset, length, desired_access)
  163         xmm_obj_t mobj;
  164         xmm_obj_t kobj;
  165         vm_offset_t offset;
  166         vm_size_t length;
  167         vm_prot_t desired_access;
  168 {
  169 #ifdef  lint
  170         M_DATA_UNLOCK(mobj, kobj, offset, length, desired_access);
  171 #endif  lint
  172         return xmm_invalid_complain("data_unlock", kobj, mobj);
  173 }
  174 
  175 m_invalid_data_write(mobj, kobj, offset, data, length)
  176         xmm_obj_t mobj;
  177         xmm_obj_t kobj;
  178         vm_offset_t offset;
  179         vm_offset_t data;
  180         vm_size_t length;
  181 {
  182 #ifdef  lint
  183         M_DATA_WRITE(mobj, kobj, offset, data, length);
  184 #endif  lint
  185         return xmm_invalid_complain("data_write", kobj, mobj);
  186 }
  187 
  188 m_invalid_lock_completed(reply, offset, length)
  189         xmm_reply_t reply;
  190         vm_offset_t offset;
  191         vm_size_t length;
  192 {
  193 #ifdef  lint
  194         M_LOCK_COMPLETED(reply, offset, length);
  195 #endif  lint
  196         return xmm_invalid_complain_reply("lock_completed", reply);
  197 }
  198 
  199 m_invalid_supply_completed(reply, offset, length, result, error_offset)
  200         xmm_reply_t reply;
  201         vm_offset_t offset;
  202         vm_size_t length;
  203         kern_return_t result;
  204         vm_offset_t error_offset;
  205 {
  206 #ifdef  lint
  207         M_SUPPLY_COMPLETED(reply, offset, length, result, error_offset);
  208 #endif  lint
  209         return xmm_invalid_complain_reply("supply_completed", reply);
  210 }
  211 
  212 m_invalid_data_return(mobj, kobj, offset, data, length)
  213         xmm_obj_t mobj;
  214         xmm_obj_t kobj;
  215         vm_offset_t offset;
  216         vm_offset_t data;
  217         vm_size_t length;
  218 {
  219 #ifdef  lint
  220         M_DATA_RETURN(mobj, kobj, offset, data, length);
  221 #endif  lint
  222         return xmm_invalid_complain("data_return", kobj, mobj);
  223 }
  224 
  225 m_invalid_change_completed(reply, may_cache, copy_strategy)
  226         xmm_reply_t reply;
  227         boolean_t may_cache;
  228         memory_object_copy_strategy_t copy_strategy;
  229 {
  230 #ifdef  lint
  231         M_CHANGE_COMPLETED(reply, may_cache, copy_strategy);
  232 #endif  lint
  233         return xmm_invalid_complain_reply("change_completed", reply);
  234 }
  235 
  236 k_invalid_data_unavailable(kobj, offset, length)
  237         xmm_obj_t kobj;
  238         vm_offset_t offset;
  239         vm_size_t length;
  240 {
  241 #ifdef  lint
  242         K_DATA_UNAVAILABLE(kobj, offset, length);
  243 #endif  lint
  244         return xmm_invalid_complain("data_unavailable", kobj, kobj);
  245 }
  246 
  247 k_invalid_get_attributes(kobj, object_ready, may_cache, copy_strategy)
  248         xmm_obj_t kobj;
  249         boolean_t *object_ready;
  250         boolean_t *may_cache;
  251         memory_object_copy_strategy_t *copy_strategy;
  252 {
  253 #ifdef  lint
  254         K_GET_ATTRIBUTES(kobj, object_ready, may_cache, copy_strategy);
  255 #endif  lint
  256         return xmm_invalid_complain("get_attributes", kobj, kobj);
  257 }
  258 
  259 k_invalid_lock_request(kobj, offset, length, should_clean, should_flush,
  260                        lock_value, reply)
  261         xmm_obj_t kobj;
  262         vm_offset_t offset;
  263         vm_size_t length;
  264         boolean_t should_clean;
  265         boolean_t should_flush;
  266         vm_prot_t lock_value;
  267         xmm_reply_t reply;
  268 {
  269 #ifdef  lint
  270         K_LOCK_REQUEST(kobj, offset, length, should_clean, should_flush,
  271                        lock_value, reply);
  272 #endif  lint
  273         return xmm_invalid_complain("lock_request", kobj, kobj);
  274 }
  275 
  276 k_invalid_data_error(kobj, offset, length, error_value)
  277         xmm_obj_t kobj;
  278         vm_offset_t offset;
  279         vm_size_t length;
  280         kern_return_t error_value;
  281 {
  282 #ifdef  lint
  283         K_DATA_ERROR(kobj, offset, length, error_value);
  284 #endif  lint
  285         return xmm_invalid_complain("data_error", kobj, kobj);
  286 }
  287 
  288 k_invalid_set_ready(kobj, object_ready, may_cache, copy_strategy,
  289                     use_old_pageout, memory_object_name, reply)
  290         xmm_obj_t kobj;
  291         boolean_t object_ready;
  292         boolean_t may_cache;
  293         memory_object_copy_strategy_t copy_strategy;
  294         boolean_t use_old_pageout;
  295         ipc_port_t memory_object_name;
  296         xmm_reply_t reply;
  297 {
  298 #ifdef  lint
  299         K_SET_READY(kobj, object_ready, may_cache, copy_strategy,
  300                     use_old_pageout, memory_object_name, reply);
  301 #endif  lint
  302         return xmm_invalid_complain("set_ready", kobj, kobj);
  303 }
  304 
  305 k_invalid_destroy(kobj, reason)
  306         xmm_obj_t kobj;
  307         kern_return_t reason;
  308 {
  309 #ifdef  lint
  310         K_DESTROY(kobj, reason);
  311 #endif  lint
  312         return xmm_invalid_complain("destroy", kobj, kobj);
  313 }
  314 
  315 k_invalid_data_supply(kobj, offset, data, length, lock_value, precious, reply)
  316         xmm_obj_t kobj;
  317         vm_offset_t offset;
  318         vm_offset_t data;
  319         vm_size_t length;
  320         vm_prot_t lock_value;
  321         boolean_t precious;
  322         xmm_reply_t reply;
  323 {
  324 #ifdef  lint
  325         K_DATA_SUPPLY(kobj, offset, data, length, lock_value, precious, reply);
  326 #endif  lint
  327         return xmm_invalid_complain("data_supply", kobj, kobj);
  328 }

Cache object: 30d85dea5b732e9f74bfb5be180bfc9a


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