|
|
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: #ifndef _KERN_IPC_KOBJECT_H_
40: #define _KERN_IPC_KOBJECT_H_
41:
42: #include <mach/machine/vm_types.h>
1.1.1.3 ! root 43: #include <ipc/ipc_types.h>
! 44: #include <ipc/ipc_kmsg.h>
1.1 root 45:
46: typedef vm_offset_t ipc_kobject_t;
47:
48: #define IKO_NULL ((ipc_kobject_t) 0)
49:
50: typedef unsigned int ipc_kobject_type_t;
51:
52: #define IKOT_NONE 0
53: #define IKOT_THREAD 1
54: #define IKOT_TASK 2
55: #define IKOT_HOST 3
56: #define IKOT_HOST_PRIV 4
57: #define IKOT_PROCESSOR 5
58: #define IKOT_PSET 6
59: #define IKOT_PSET_NAME 7
60: #define IKOT_PAGER 8
61: #define IKOT_PAGING_REQUEST 9
62: #define IKOT_DEVICE 10
63: #define IKOT_XMM_OBJECT 11
64: #define IKOT_XMM_PAGER 12
65: #define IKOT_XMM_KERNEL 13
66: #define IKOT_XMM_REPLY 14
67: #define IKOT_PAGER_TERMINATING 15
68: #define IKOT_PAGING_NAME 16
69: #define IKOT_HOST_SECURITY 17
70: #define IKOT_LEDGER 18
71: #define IKOT_MASTER_DEVICE 19
72: #define IKOT_ACT 20
73: #define IKOT_SUBSYSTEM 21
74: #define IKOT_IO_DONE_QUEUE 22
75: #define IKOT_SEMAPHORE 23
76: #define IKOT_LOCK_SET 24
77: #define IKOT_CLOCK 25
78: #define IKOT_CLOCK_CTRL 26
1.1.1.2 root 79: #define IKOT_PAGER_PROXY 27
1.1 root 80: /* << new entries here */
1.1.1.2 root 81: #define IKOT_UNKNOWN 28 /* magic catchall */
82: #define IKOT_MAX_TYPE 29 /* # of IKOT_ types */
1.1 root 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:
1.1.1.2 root 116: /* Deliver notifications to kobjects that care about them */
117: extern boolean_t ipc_kobject_notify (
118: mach_msg_header_t *request_header,
119: mach_msg_header_t *reply_header);
120:
1.1 root 121: #define null_conversion(port) (port)
122:
123: #endif /* _KERN_IPC_KOBJECT_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.