]>
Commit | Line | Data |
---|---|---|
1c79356b | 1 | /* |
55e303ae | 2 | * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved. |
1c79356b A |
3 | * |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
e5568f75 A |
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. | |
1c79356b | 11 | * |
e5568f75 A |
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 | |
1c79356b A |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
e5568f75 A |
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. | |
1c79356b A |
19 | * |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | /* | |
23 | * @OSF_COPYRIGHT@ | |
24 | */ | |
1c79356b A |
25 | /* |
26 | * Mach Operating System | |
27 | * Copyright (c) 1991,1990,1989,1988,1987 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 Software.Distribution@CS.CMU.EDU | |
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: mach/notify.h | |
54 | * | |
55 | * Kernel notification message definitions. | |
56 | */ | |
57 | ||
58 | #ifndef _MACH_NOTIFY_H_ | |
59 | #define _MACH_NOTIFY_H_ | |
60 | ||
61 | #include <mach/port.h> | |
62 | #include <mach/message.h> | |
63 | #include <mach/ndr.h> | |
64 | ||
65 | /* | |
66 | * An alternative specification of the notification interface | |
67 | * may be found in mach/notify.defs. | |
68 | */ | |
69 | ||
70 | #define MACH_NOTIFY_FIRST 0100 | |
71 | #define MACH_NOTIFY_PORT_DELETED (MACH_NOTIFY_FIRST + 001 ) | |
72 | /* A send or send-once right was deleted. */ | |
73 | #define MACH_NOTIFY_PORT_DESTROYED (MACH_NOTIFY_FIRST + 005) | |
74 | /* A receive right was (would have been) deallocated */ | |
75 | #define MACH_NOTIFY_NO_SENDERS (MACH_NOTIFY_FIRST + 006) | |
76 | /* Receive right has no extant send rights */ | |
77 | #define MACH_NOTIFY_SEND_ONCE (MACH_NOTIFY_FIRST + 007) | |
78 | /* An extant send-once right died */ | |
79 | #define MACH_NOTIFY_DEAD_NAME (MACH_NOTIFY_FIRST + 010) | |
80 | /* Send or send-once right died, leaving a dead-name */ | |
81 | #define MACH_NOTIFY_LAST (MACH_NOTIFY_FIRST + 015) | |
82 | ||
55e303ae A |
83 | typedef mach_port_t notify_port_t; |
84 | ||
85 | #include <sys/appleapiopts.h> | |
86 | #ifdef __APPLE_API_OBSOLETE | |
87 | /* | |
88 | * Hard-coded message structures for receiving Mach port notification | |
89 | * messages. However, they are not actual large enough to receive | |
90 | * the largest trailers current exported by Mach IPC (so they cannot | |
91 | * be used for space allocations in situations using these new larger | |
92 | * trailers). Instead, the MIG-generated server routines (and | |
93 | * related prototypes should be used). | |
94 | */ | |
1c79356b A |
95 | typedef struct { |
96 | mach_msg_header_t not_header; | |
97 | NDR_record_t NDR; | |
98 | mach_port_name_t not_port;/* MACH_MSG_TYPE_PORT_NAME */ | |
99 | mach_msg_format_0_trailer_t trailer; | |
100 | } mach_port_deleted_notification_t; | |
101 | ||
102 | typedef struct { | |
103 | mach_msg_header_t not_header; | |
104 | mach_msg_body_t not_body; | |
105 | mach_msg_port_descriptor_t not_port;/* MACH_MSG_TYPE_PORT_RECEIVE */ | |
106 | mach_msg_format_0_trailer_t trailer; | |
107 | } mach_port_destroyed_notification_t; | |
108 | ||
109 | typedef struct { | |
110 | mach_msg_header_t not_header; | |
111 | NDR_record_t NDR; | |
112 | mach_msg_type_number_t not_count; | |
113 | mach_msg_format_0_trailer_t trailer; | |
114 | } mach_no_senders_notification_t; | |
115 | ||
116 | typedef struct { | |
117 | mach_msg_header_t not_header; | |
118 | mach_msg_format_0_trailer_t trailer; | |
119 | } mach_send_once_notification_t; | |
120 | ||
121 | typedef struct { | |
122 | mach_msg_header_t not_header; | |
123 | NDR_record_t NDR; | |
124 | mach_port_name_t not_port;/* MACH_MSG_TYPE_PORT_NAME */ | |
125 | mach_msg_format_0_trailer_t trailer; | |
126 | } mach_dead_name_notification_t; | |
127 | ||
55e303ae A |
128 | #endif /* __APPLE_API_OBSOLETE */ |
129 | ||
1c79356b | 130 | #endif /* _MACH_NOTIFY_H_ */ |