Annotation of OSKit-Mach/kern/ipc_kobject.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Mach Operating System
                      3:  * Copyright (c) 1991,1990,1989 Carnegie Mellon University.
                      4:  * Copyright (c) 1993,1994 The University of Utah and
                      5:  * the Computer Systems Laboratory (CSL).
                      6:  * All rights reserved.
                      7:  *
                      8:  * Permission to use, copy, modify and distribute this software and its
                      9:  * documentation is hereby granted, provided that both the copyright
                     10:  * notice and this permission notice appear in all copies of the
                     11:  * software, derivative works or modified versions, and any portions
                     12:  * thereof, and that both notices appear in supporting documentation.
                     13:  *
                     14:  * CARNEGIE MELLON, THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF
                     15:  * THIS SOFTWARE IN ITS "AS IS" CONDITION, AND DISCLAIM ANY LIABILITY
                     16:  * OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF
                     17:  * THIS SOFTWARE.
                     18:  *
                     19:  * Carnegie Mellon requests users of this software to return to
                     20:  *
                     21:  *  Software Distribution Coordinator  or  [email protected]
                     22:  *  School of Computer Science
                     23:  *  Carnegie Mellon University
                     24:  *  Pittsburgh PA 15213-3890
                     25:  *
                     26:  * any improvements or extensions that they make and grant Carnegie Mellon
                     27:  * the rights to redistribute these changes.
                     28:  */
                     29: /*
                     30:  */
                     31: /*
                     32:  *     File:   kern/ipc_kobject.h
                     33:  *     Author: Rich Draves
                     34:  *     Date:   1989
                     35:  *
                     36:  *     Declarations for letting a port represent a kernel object.
                     37:  */
                     38: 
                     39: #include <ipc/ipc_kmsg.h>
                     40: #include <ipc/ipc_types.h>
                     41: 
                     42: #ifndef        _KERN_IPC_KOBJECT_H_
                     43: #define _KERN_IPC_KOBJECT_H_
                     44: 
                     45: #include <mach/machine/vm_types.h>
                     46: 
                     47: typedef vm_offset_t ipc_kobject_t;
                     48: 
                     49: #define        IKO_NULL        ((ipc_kobject_t) 0)
                     50: 
                     51: typedef unsigned int ipc_kobject_type_t;
                     52: 
                     53: #define        IKOT_NONE               0
                     54: #define IKOT_THREAD            1
                     55: #define        IKOT_TASK               2
                     56: #define        IKOT_HOST               3
                     57: #define        IKOT_HOST_PRIV          4
                     58: #define        IKOT_PROCESSOR          5
                     59: #define        IKOT_PSET               6
                     60: #define        IKOT_PSET_NAME          7
                     61: #define        IKOT_PAGER              8
                     62: #define        IKOT_PAGING_REQUEST     9
                     63: #define        IKOT_DEVICE             10
                     64: #define        IKOT_XMM_OBJECT         11
                     65: #define        IKOT_XMM_PAGER          12
                     66: #define        IKOT_XMM_KERNEL         13
                     67: #define        IKOT_XMM_REPLY          14
                     68: #define        IKOT_PAGER_TERMINATING  15
                     69: #define IKOT_PAGING_NAME       16
                     70: #define IKOT_HOST_SECURITY     17
                     71: #define        IKOT_LEDGER             18
                     72: #define IKOT_MASTER_DEVICE     19
                     73: #define IKOT_ACT               20
                     74: #define IKOT_SUBSYSTEM         21
                     75: #define IKOT_IO_DONE_QUEUE     22
                     76: #define IKOT_SEMAPHORE         23
                     77: #define IKOT_LOCK_SET          24
                     78: #define IKOT_CLOCK             25
                     79: #define IKOT_CLOCK_CTRL                26
                     80:                                        /* << new entries here  */
                     81: #define        IKOT_UNKNOWN            27      /* magic catchall       */
                     82: #define        IKOT_MAX_TYPE           28      /* # of IKOT_ types     */
                     83:  /* Please keep ipc/ipc_object.c:ikot_print_array up to date   */
                     84: 
                     85: #define is_ipc_kobject(ikot)   (ikot != IKOT_NONE)
                     86: 
                     87: /*
                     88:  *     Define types of kernel objects that use page lists instead
                     89:  *     of entry lists for copyin of out of line memory.
                     90:  */
                     91: 
                     92: #define ipc_kobject_vm_page_list(ikot)                         \
                     93:        ((ikot == IKOT_PAGING_REQUEST) || (ikot == IKOT_DEVICE))
                     94: 
                     95: #define ipc_kobject_vm_page_steal(ikot)        (ikot == IKOT_PAGING_REQUEST)
                     96: 
                     97: /* Initialize kernel server dispatch table */
                     98: /* XXX
                     99: extern void mig_init(void);
                    100: */
                    101: 
                    102: /* Dispatch a kernel server function */
                    103: extern ipc_kmsg_t ipc_kobject_server(
                    104:        ipc_kmsg_t      request);
                    105: 
                    106: /* Make a port represent a kernel object of the given type */
                    107: extern void ipc_kobject_set(
                    108:        ipc_port_t              port,
                    109:        ipc_kobject_t           kobject,
                    110:        ipc_kobject_type_t      type);
                    111: 
                    112: /* Release any kernel object resources associated with a port */
                    113: extern void ipc_kobject_destroy(
                    114:        ipc_port_t              port);
                    115: 
                    116: #define        null_conversion(port)   (port)
                    117: 
                    118: #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.