]> git.saurik.com Git - apple/xnu.git/blame - osfmk/mach/notify.h
xnu-344.34.tar.gz
[apple/xnu.git] / osfmk / mach / notify.h
CommitLineData
1c79356b 1/*
9bccf70c 2 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
1c79356b
A
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
de355530
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 *
de355530
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,
de355530
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
83typedef struct {
84 mach_msg_header_t not_header;
85 NDR_record_t NDR;
86 mach_port_name_t not_port;/* MACH_MSG_TYPE_PORT_NAME */
87 mach_msg_format_0_trailer_t trailer;
88} mach_port_deleted_notification_t;
89
90typedef struct {
91 mach_msg_header_t not_header;
92 mach_msg_body_t not_body;
93 mach_msg_port_descriptor_t not_port;/* MACH_MSG_TYPE_PORT_RECEIVE */
94 mach_msg_format_0_trailer_t trailer;
95} mach_port_destroyed_notification_t;
96
97typedef struct {
98 mach_msg_header_t not_header;
99 NDR_record_t NDR;
100 mach_msg_type_number_t not_count;
101 mach_msg_format_0_trailer_t trailer;
102} mach_no_senders_notification_t;
103
104typedef struct {
105 mach_msg_header_t not_header;
106 mach_msg_format_0_trailer_t trailer;
107} mach_send_once_notification_t;
108
109typedef struct {
110 mach_msg_header_t not_header;
111 NDR_record_t NDR;
112 mach_port_name_t not_port;/* MACH_MSG_TYPE_PORT_NAME */
113 mach_msg_format_0_trailer_t trailer;
114} mach_dead_name_notification_t;
115
116#endif /* _MACH_NOTIFY_H_ */