Annotation of XNU/osfmk/kern/ipc_kobject.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
        !             3:  *
        !             4:  * @APPLE_LICENSE_HEADER_START@
        !             5:  * 
        !             6:  * The contents of this file constitute Original Code as defined in and
        !             7:  * are subject to the Apple Public Source License Version 1.1 (the
        !             8:  * "License").  You may not use this file except in compliance with the
        !             9:  * License.  Please obtain a copy of the License at
        !            10:  * http://www.apple.com/publicsource and read it before using this file.
        !            11:  * 
        !            12:  * This Original Code and all software distributed under the License are
        !            13:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
        !            14:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
        !            15:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
        !            16:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
        !            17:  * License for the specific language governing rights and limitations
        !            18:  * under the License.
        !            19:  * 
        !            20:  * @APPLE_LICENSE_HEADER_END@
        !            21:  */
        !            22: /*
        !            23:  * @OSF_COPYRIGHT@
        !            24:  */
        !            25: /* 
        !            26:  * Mach Operating System
        !            27:  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
        !            28:  * All Rights Reserved.
        !            29:  * 
        !            30:  * Permission to use, copy, modify and distribute this software and its
        !            31:  * documentation is hereby granted, provided that both the copyright
        !            32:  * notice and this permission notice appear in all copies of the
        !            33:  * software, derivative works or modified versions, and any portions
        !            34:  * thereof, and that both notices appear in supporting documentation.
        !            35:  * 
        !            36:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
        !            37:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
        !            38:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
        !            39:  * 
        !            40:  * Carnegie Mellon requests users of this software to return to
        !            41:  * 
        !            42:  *  Software Distribution Coordinator  or  [email protected]
        !            43:  *  School of Computer Science
        !            44:  *  Carnegie Mellon University
        !            45:  *  Pittsburgh PA 15213-3890
        !            46:  * 
        !            47:  * any improvements or extensions that they make and grant Carnegie Mellon
        !            48:  * the rights to redistribute these changes.
        !            49:  */
        !            50: /*
        !            51:  */
        !            52: /*
        !            53:  *     File:   kern/ipc_kobject.h
        !            54:  *     Author: Rich Draves
        !            55:  *     Date:   1989
        !            56:  *
        !            57:  *     Declarations for letting a port represent a kernel object.
        !            58:  */
        !            59: 
        !            60: #include <ipc/ipc_kmsg.h>
        !            61: #include <ipc/ipc_port.h>
        !            62: 
        !            63: #ifndef        _KERN_IPC_KOBJECT_H_
        !            64: #define _KERN_IPC_KOBJECT_H_
        !            65: 
        !            66: #ifdef KERNEL_PRIVATE
        !            67: /*
        !            68:  * This is the legacy in-kernel ipc-object mechanism.  Over the next
        !            69:  * several months, this will be phased out in favor of a mechanism that
        !            70:  * is less Mach IPC specific, and common across in-mach, in-kernel-component,
        !            71:  * and user-level-component (Plugin) models.
        !            72:  */
        !            73: #include <mach/machine/vm_types.h>
        !            74: #include <mach/mach_types.h>
        !            75: 
        !            76: 
        !            77: typedef natural_t      ipc_kobject_type_t;
        !            78: 
        !            79: #define        IKOT_NONE               0
        !            80: #define IKOT_THREAD            1
        !            81: #define        IKOT_TASK               2
        !            82: #define        IKOT_HOST               3
        !            83: #define        IKOT_HOST_PRIV          4
        !            84: #define        IKOT_PROCESSOR          5
        !            85: #define        IKOT_PSET               6
        !            86: #define        IKOT_PSET_NAME          7
        !            87: /* #define     IKOT_PAGER      8       No longer defined */
        !            88: #define        IKOT_PAGING_REQUEST     9
        !            89: #define        IKOT_DEVICE             10
        !            90: #define        IKOT_XMM_OBJECT         11
        !            91: #define        IKOT_XMM_PAGER          12
        !            92: #define        IKOT_XMM_KERNEL         13
        !            93: #define        IKOT_XMM_REPLY          14
        !            94: /* #define     IKOT_PAGER_TERMINATING  15  No longer defined */
        !            95: #define IKOT_HOST_SECURITY     17
        !            96: #define        IKOT_LEDGER             18
        !            97: #define IKOT_MASTER_DEVICE     19
        !            98: #define IKOT_ACT               20
        !            99: #define IKOT_SUBSYSTEM         21
        !           100: #define IKOT_IO_DONE_QUEUE     22
        !           101: #define IKOT_SEMAPHORE         23
        !           102: #define IKOT_LOCK_SET          24
        !           103: #define IKOT_CLOCK             25
        !           104: #define IKOT_CLOCK_CTRL                26
        !           105: #define IKOT_IOKIT_SPARE       27
        !           106: #define IKOT_NAMED_ENTRY       28
        !           107: #define IKOT_IOKIT_CONNECT     29
        !           108: #define IKOT_IOKIT_OBJECT      30
        !           109: #define IKOT_UPL               31
        !           110:                                        /* << new entries here  */
        !           111: #define        IKOT_UNKNOWN            32      /* magic catchall       */
        !           112: #define        IKOT_MAX_TYPE           33      /* # of IKOT_ types     */
        !           113:  /* Please keep ipc/ipc_object.c:ikot_print_array up to date   */
        !           114: 
        !           115: #define is_ipc_kobject(ikot)   (ikot != IKOT_NONE)
        !           116: 
        !           117: /*
        !           118:  *     Define types of kernel objects that use page lists instead
        !           119:  *     of entry lists for copyin of out of line memory.
        !           120:  */
        !           121: 
        !           122: #define ipc_kobject_vm_page_list(ikot)                         \
        !           123:        ((ikot == IKOT_PAGING_REQUEST) || (ikot == IKOT_DEVICE))
        !           124: 
        !           125: #define ipc_kobject_vm_page_steal(ikot)        (ikot == IKOT_PAGING_REQUEST)
        !           126: 
        !           127: /* Initialize kernel server dispatch table */
        !           128: extern void mig_init(void);
        !           129: 
        !           130: /* Dispatch a kernel server function */
        !           131: extern ipc_kmsg_t ipc_kobject_server(
        !           132:        ipc_kmsg_t      request);
        !           133: 
        !           134: /* Make a port represent a kernel object of the given type */
        !           135: extern void ipc_kobject_set(
        !           136:        ipc_port_t              port,
        !           137:        ipc_kobject_t           kobject,
        !           138:        ipc_kobject_type_t      type);
        !           139: 
        !           140: /* Release any kernel object resources associated with a port */
        !           141: extern void ipc_kobject_destroy(
        !           142:        ipc_port_t              port);
        !           143: 
        !           144: #define        null_conversion(port)   (port)
        !           145: 
        !           146: #endif /* KERNEL_PRIVATE */
        !           147: 
        !           148: #endif /* _KERN_IPC_KOBJECT_H_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.