]> git.saurik.com Git - apple/xnu.git/blob - osfmk/mach/notify.h
259ab0942dc4771c2ef49097a32d1bcb2ed7bc82
[apple/xnu.git] / osfmk / mach / notify.h
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 * HISTORY
27 *
28 * Revision 1.1.1.1 1998/09/22 21:05:30 wsanchez
29 * Import of Mac OS X kernel (~semeria)
30 *
31 * Revision 1.1.1.1 1998/03/07 02:25:46 wsanchez
32 * Import of OSF Mach kernel (~mburg)
33 *
34 * Revision 1.2.12.2 1996/01/09 19:22:05 devrcs
35 * Made not_count in mach_no_senders_notification_t
36 * a mach_msg_type_number_t.
37 * [1995/12/01 19:49:21 jfraser]
38 *
39 * Merged '64-bit safe' changes from DEC alpha port.
40 * [1995/11/21 18:09:14 jfraser]
41 *
42 * Revision 1.2.12.1 1994/09/23 02:41:27 ezf
43 * change marker to not FREE
44 * [1994/09/22 21:42:15 ezf]
45 *
46 * Revision 1.2.6.5 1993/09/09 16:07:46 jeffc
47 * CR9745 - delete message accepted notifications
48 * [1993/09/03 22:15:11 jeffc]
49 *
50 * Revision 1.2.6.4 1993/08/05 19:09:35 jeffc
51 * CR9508 - Delete dead code. Remove MACH_IPC_TYPED
52 * [1993/08/03 20:18:41 jeffc]
53 *
54 * CR9508 - Delete dead code. Remove MACH_IPC_COMPAT
55 * [1993/08/03 17:09:19 jeffc]
56 *
57 * Revision 1.2.6.3 1993/08/03 18:29:46 gm
58 * CR9596: Change KERNEL to MACH_KERNEL.
59 * [1993/08/02 18:24:51 gm]
60 *
61 * Revision 1.2.6.2 1993/06/09 02:42:49 gm
62 * Fix untyped notifications. CR #8969
63 * [1993/04/27 11:29:30 rod]
64 *
65 * Revision 1.2 1993/04/19 16:38:19 devrcs
66 * Added trailer support to untyped ipc. [travos@osf.org, fdr@osf.org]
67 * [1993/04/06 18:28:00 travos]
68 * Merge untyped ipc:
69 * Remove the NDR format label from messages with no untyped data
70 * [1993/03/12 22:50:02 travos]
71 * changed msgh_body to not_body in the notification message structures.
72 * [1993/02/25 21:50:38 fdr]
73 * New definitions for notifications (via compile option MACH_IPC_TYPED)
74 * [1993/02/24 19:25:42 travos]
75 *
76 * ansi C conformance changes
77 * [1993/02/02 18:54:03 david]
78 * Revision 1.1 1992/09/30 02:31:55 robert
79 * Initial revision
80 * [1993/02/02 19:05:08 david]
81 *
82 * $EndLog$
83 */
84 /* CMU_HIST */
85 /*
86 * Revision 2.4.2.1 92/03/03 16:22:23 jeffreyh
87 * Changes form TRUNK
88 * [92/02/26 12:12:10 jeffreyh]
89 *
90 * Revision 2.5 92/01/15 13:44:41 rpd
91 * Changed MACH_IPC_COMPAT conditionals to default to not present.
92 *
93 * Revision 2.4 91/05/14 16:58:21 mrt
94 * Correcting copyright
95 *
96 * Revision 2.3 91/02/05 17:35:18 mrt
97 * Changed to new Mach copyright
98 * [91/02/01 17:20:02 mrt]
99 *
100 * Revision 2.2 90/06/02 14:59:32 rpd
101 * Converted to new IPC.
102 * [90/03/26 22:38:14 rpd]
103 *
104 * Revision 2.7.7.1 90/02/20 22:24:32 rpd
105 * Revised for new IPC.
106 * [90/02/19 23:38:57 rpd]
107 *
108 *
109 * Condensed history:
110 * Moved ownership rights under MACH_IPC_XXXHACK (rpd).
111 * Added NOTIFY_PORT_DESTROYED (rpd).
112 * Added notification message structure definition (mwyoung).
113 * Created, based on Accent values (mwyoung).
114 */
115 /* CMU_ENDHIST */
116 /*
117 * Mach Operating System
118 * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
119 * All Rights Reserved.
120 *
121 * Permission to use, copy, modify and distribute this software and its
122 * documentation is hereby granted, provided that both the copyright
123 * notice and this permission notice appear in all copies of the
124 * software, derivative works or modified versions, and any portions
125 * thereof, and that both notices appear in supporting documentation.
126 *
127 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
128 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
129 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
130 *
131 * Carnegie Mellon requests users of this software to return to
132 *
133 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
134 * School of Computer Science
135 * Carnegie Mellon University
136 * Pittsburgh PA 15213-3890
137 *
138 * any improvements or extensions that they make and grant Carnegie Mellon
139 * the rights to redistribute these changes.
140 */
141 /*
142 */
143 /*
144 * File: mach/notify.h
145 *
146 * Kernel notification message definitions.
147 */
148
149 #ifndef _MACH_NOTIFY_H_
150 #define _MACH_NOTIFY_H_
151
152 #include <mach/port.h>
153 #include <mach/message.h>
154 #include <mach/ndr.h>
155
156 /*
157 * An alternative specification of the notification interface
158 * may be found in mach/notify.defs.
159 */
160
161 #define MACH_NOTIFY_FIRST 0100
162 #define MACH_NOTIFY_PORT_DELETED (MACH_NOTIFY_FIRST + 001 )
163 /* A send or send-once right was deleted. */
164 #define MACH_NOTIFY_PORT_DESTROYED (MACH_NOTIFY_FIRST + 005)
165 /* A receive right was (would have been) deallocated */
166 #define MACH_NOTIFY_NO_SENDERS (MACH_NOTIFY_FIRST + 006)
167 /* Receive right has no extant send rights */
168 #define MACH_NOTIFY_SEND_ONCE (MACH_NOTIFY_FIRST + 007)
169 /* An extant send-once right died */
170 #define MACH_NOTIFY_DEAD_NAME (MACH_NOTIFY_FIRST + 010)
171 /* Send or send-once right died, leaving a dead-name */
172 #define MACH_NOTIFY_LAST (MACH_NOTIFY_FIRST + 015)
173
174 typedef struct {
175 mach_msg_header_t not_header;
176 NDR_record_t NDR;
177 mach_port_name_t not_port;/* MACH_MSG_TYPE_PORT_NAME */
178 mach_msg_format_0_trailer_t trailer;
179 } mach_port_deleted_notification_t;
180
181 typedef struct {
182 mach_msg_header_t not_header;
183 mach_msg_body_t not_body;
184 mach_msg_port_descriptor_t not_port;/* MACH_MSG_TYPE_PORT_RECEIVE */
185 mach_msg_format_0_trailer_t trailer;
186 } mach_port_destroyed_notification_t;
187
188 typedef struct {
189 mach_msg_header_t not_header;
190 NDR_record_t NDR;
191 mach_msg_type_number_t not_count;
192 mach_msg_format_0_trailer_t trailer;
193 } mach_no_senders_notification_t;
194
195 typedef struct {
196 mach_msg_header_t not_header;
197 mach_msg_format_0_trailer_t trailer;
198 } mach_send_once_notification_t;
199
200 typedef struct {
201 mach_msg_header_t not_header;
202 NDR_record_t NDR;
203 mach_port_name_t not_port;/* MACH_MSG_TYPE_PORT_NAME */
204 mach_msg_format_0_trailer_t trailer;
205 } mach_dead_name_notification_t;
206
207 #endif /* _MACH_NOTIFY_H_ */