2  * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. 
   4  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 
   6  * This file contains Original Code and/or Modifications of Original Code 
   7  * as defined in and that are subject to the Apple Public Source License 
   8  * Version 2.0 (the 'License'). You may not use this file except in 
   9  * compliance with the License. The rights granted to you under the License 
  10  * may not be used to create, or enable the creation or redistribution of, 
  11  * unlawful or unlicensed copies of an Apple operating system, or to 
  12  * circumvent, violate, or enable the circumvention or violation of, any 
  13  * terms of an Apple operating system software license agreement. 
  15  * Please obtain a copy of the License at 
  16  * http://www.opensource.apple.com/apsl/ and read it before using this file. 
  18  * The Original Code and all software distributed under the License are 
  19  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
  20  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
  21  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 
  22  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 
  23  * Please see the License for the specific language governing rights and 
  24  * limitations under the License. 
  26  * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 
  32  * Mach Operating System 
  33  * Copyright (c) 1991,1990,1989 Carnegie Mellon University 
  34  * All Rights Reserved. 
  36  * Permission to use, copy, modify and distribute this software and its 
  37  * documentation is hereby granted, provided that both the copyright 
  38  * notice and this permission notice appear in all copies of the 
  39  * software, derivative works or modified versions, and any portions 
  40  * thereof, and that both notices appear in supporting documentation. 
  42  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 
  43  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 
  44  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 
  46  * Carnegie Mellon requests users of this software to return to 
  48  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU 
  49  *  School of Computer Science 
  50  *  Carnegie Mellon University 
  51  *  Pittsburgh PA 15213-3890 
  53  * any improvements or extensions that they make and grant Carnegie Mellon 
  54  * the rights to redistribute these changes. 
  59  *      File:   kern/ipc_kobject.h 
  63  *      Declarations for letting a port represent a kernel object. 
  66 #include <ipc/ipc_kmsg.h> 
  67 #include <ipc/ipc_port.h> 
  69 #ifndef _KERN_IPC_KOBJECT_H_ 
  70 #define _KERN_IPC_KOBJECT_H_ 
  74  * This is the legacy in-kernel ipc-object mechanism.  Over the next 
  75  * several months, this will be phased out in favor of a mechanism that 
  76  * is less Mach IPC specific, and common across in-mach, in-kernel-component, 
  77  * and user-level-component (Plugin) models. 
  79 #include <mach/machine/vm_types.h> 
  80 #include <mach/mach_types.h> 
  82 typedef natural_t       ipc_kobject_type_t
; 
  88 #define IKOT_HOST_PRIV                  4 
  89 #define IKOT_PROCESSOR                  5 
  91 #define IKOT_PSET_NAME                  7 
  93 #define IKOT_PAGING_REQUEST             9 
  95 #define IKOT_MEMORY_OBJECT              11 
  96 #define IKOT_XMM_PAGER                  12 
  97 #define IKOT_XMM_KERNEL                 13 
  98 #define IKOT_XMM_REPLY                  14 
  99 #define IKOT_UND_REPLY                  15 
 100 #define IKOT_HOST_NOTIFY                16 
 101 #define IKOT_HOST_SECURITY              17 
 102 #define IKOT_LEDGER                             18 
 103 #define IKOT_MASTER_DEVICE              19 
 105 #define IKOT_SUBSYSTEM                  21 
 106 #define IKOT_IO_DONE_QUEUE              22 
 107 #define IKOT_SEMAPHORE                  23 
 108 #define IKOT_LOCK_SET                   24 
 109 #define IKOT_CLOCK                              25 
 110 #define IKOT_CLOCK_CTRL                 26 
 111 #define IKOT_IOKIT_SPARE                27 
 112 #define IKOT_NAMED_ENTRY                28 
 113 #define IKOT_IOKIT_CONNECT              29 
 114 #define IKOT_IOKIT_OBJECT               30 
 116                                                                 /* << new entries here  */ 
 117 #define IKOT_UNKNOWN                    32      /* magic catchall       */ 
 118 #define IKOT_MAX_TYPE                   33      /* # of IKOT_ types     */ 
 120 /* Please keep ipc/ipc_object.c:ikot_print_array up to date     */ 
 122 #define is_ipc_kobject(ikot)    ((ikot) != IKOT_NONE) 
 125  *      Define types of kernel objects that use page lists instead 
 126  *      of entry lists for copyin of out of line memory. 
 129 /* Dispatch a kernel server function */ 
 130 extern ipc_kmsg_t       
ipc_kobject_server( 
 133 /* Make a port represent a kernel object of the given type */ 
 134 extern void             ipc_kobject_set( 
 136                                         ipc_kobject_t           kobject
, 
 137                                         ipc_kobject_type_t      type
); 
 139 extern void             ipc_kobject_set_atomically( 
 141                                         ipc_kobject_t           kobject
, 
 142                                         ipc_kobject_type_t      type
); 
 144 /* Release any kernel object resources associated with a port */ 
 145 extern void             ipc_kobject_destroy( 
 148 #define null_conversion(port)   (port) 
 150 #endif /* KERNEL_PRIVATE */ 
 152 #endif /* _KERN_IPC_KOBJECT_H_ */