FreeBSD/Linux Kernel Cross Reference
sys/mach/notify.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: notify.h,v $
29 * Revision 2.6 93/01/14 17:46:19 danner
30 * Cleanup.
31 * [92/06/10 pds]
32 *
33 * Revision 2.5 92/01/15 13:44:41 rpd
34 * Changed MACH_IPC_COMPAT conditionals to default to not present.
35 *
36 * Revision 2.4 91/05/14 16:58:21 mrt
37 * Correcting copyright
38 *
39 * Revision 2.3 91/02/05 17:35:18 mrt
40 * Changed to new Mach copyright
41 * [91/02/01 17:20:02 mrt]
42 *
43 * Revision 2.2 90/06/02 14:59:32 rpd
44 * Converted to new IPC.
45 * [90/03/26 22:38:14 rpd]
46 *
47 * Revision 2.7.7.1 90/02/20 22:24:32 rpd
48 * Revised for new IPC.
49 * [90/02/19 23:38:57 rpd]
50 *
51 *
52 * Condensed history:
53 * Moved ownership rights under MACH_IPC_XXXHACK (rpd).
54 * Added NOTIFY_PORT_DESTROYED (rpd).
55 * Added notification message structure definition (mwyoung).
56 * Created, based on Accent values (mwyoung).
57 */
58 /*
59 * File: mach/notify.h
60 *
61 * Kernel notification message definitions.
62 */
63
64 #ifndef _MACH_NOTIFY_H_
65 #define _MACH_NOTIFY_H_
66
67 #ifdef KERNEL
68 #include <mach_ipc_compat.h>
69 #endif /* KERNEL */
70
71 #include <mach/port.h>
72 #include <mach/message.h>
73
74 /*
75 * An alternative specification of the notification interface
76 * may be found in mach/notify.defs.
77 */
78
79 #define MACH_NOTIFY_FIRST 0100
80 #define MACH_NOTIFY_PORT_DELETED (MACH_NOTIFY_FIRST + 001 )
81 /* A send or send-once right was deleted. */
82 #define MACH_NOTIFY_MSG_ACCEPTED (MACH_NOTIFY_FIRST + 002)
83 /* A MACH_SEND_NOTIFY msg was accepted */
84 #define MACH_NOTIFY_PORT_DESTROYED (MACH_NOTIFY_FIRST + 005)
85 /* A receive right was (would have been) deallocated */
86 #define MACH_NOTIFY_NO_SENDERS (MACH_NOTIFY_FIRST + 006)
87 /* Receive right has no extant send rights */
88 #define MACH_NOTIFY_SEND_ONCE (MACH_NOTIFY_FIRST + 007)
89 /* An extant send-once right died */
90 #define MACH_NOTIFY_DEAD_NAME (MACH_NOTIFY_FIRST + 010)
91 /* Send or send-once right died, leaving a dead-name */
92 #define MACH_NOTIFY_LAST (MACH_NOTIFY_FIRST + 015)
93
94 typedef struct {
95 mach_msg_header_t not_header;
96 mach_msg_type_t not_type; /* MACH_MSG_TYPE_PORT_NAME */
97 mach_port_t not_port;
98 } mach_port_deleted_notification_t;
99
100 typedef struct {
101 mach_msg_header_t not_header;
102 mach_msg_type_t not_type; /* MACH_MSG_TYPE_PORT_NAME */
103 mach_port_t not_port;
104 } mach_msg_accepted_notification_t;
105
106 typedef struct {
107 mach_msg_header_t not_header;
108 mach_msg_type_t not_type; /* MACH_MSG_TYPE_PORT_RECEIVE */
109 mach_port_t not_port;
110 } mach_port_destroyed_notification_t;
111
112 typedef struct {
113 mach_msg_header_t not_header;
114 mach_msg_type_t not_type; /* MACH_MSG_TYPE_INTEGER_32 */
115 unsigned int not_count;
116 } mach_no_senders_notification_t;
117
118 typedef struct {
119 mach_msg_header_t not_header;
120 } mach_send_once_notification_t;
121
122 typedef struct {
123 mach_msg_header_t not_header;
124 mach_msg_type_t not_type; /* MACH_MSG_TYPE_PORT_NAME */
125 mach_port_t not_port;
126 } mach_dead_name_notification_t;
127
128
129 /* Definitions for the old IPC interface. */
130
131 #if MACH_IPC_COMPAT
132
133 /*
134 * Notifications sent upon interesting system events.
135 */
136
137 #define NOTIFY_FIRST 0100
138 #define NOTIFY_PORT_DELETED ( NOTIFY_FIRST + 001 )
139 #define NOTIFY_MSG_ACCEPTED ( NOTIFY_FIRST + 002 )
140 #define NOTIFY_OWNERSHIP_RIGHTS ( NOTIFY_FIRST + 003 )
141 #define NOTIFY_RECEIVE_RIGHTS ( NOTIFY_FIRST + 004 )
142 #define NOTIFY_PORT_DESTROYED ( NOTIFY_FIRST + 005 )
143 #define NOTIFY_NO_MORE_SENDERS ( NOTIFY_FIRST + 006 )
144 #define NOTIFY_LAST ( NOTIFY_FIRST + 015 )
145
146 typedef struct {
147 msg_header_t notify_header;
148 msg_type_t notify_type;
149 port_t notify_port;
150 } notification_t;
151
152 #endif /* MACH_IPC_COMPAT */
153
154 #endif /* _MACH_NOTIFY_H_ */
Cache object: 17045a98d7afe9ac7c4922a0f83e816d
|