|
|
1.1.1.2 root 1: /*
1.1 root 2: * Mach Operating System
3: * Copyright (c) 1991,1990,1989 Carnegie Mellon University
4: * All Rights Reserved.
1.1.1.2 root 5: *
1.1 root 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.
1.1.1.2 root 11: *
1.1 root 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.
1.1.1.2 root 15: *
1.1 root 16: * Carnegie Mellon requests users of this software to return to
1.1.1.2 root 17: *
1.1 root 18: * Software Distribution Coordinator or [email protected]
19: * School of Computer Science
20: * Carnegie Mellon University
21: * Pittsburgh PA 15213-3890
1.1.1.2 root 22: *
1.1 root 23: * any improvements or extensions that they make and grant Carnegie Mellon
24: * the rights to redistribute these changes.
25: */
26: /*
27: * File: ipc/ipc_marequest.h
28: * Author: Rich Draves
29: * Date: 1989
30: *
31: * Definitions for msg-accepted requests.
32: */
33:
34: #ifndef _IPC_IPC_MAREQUEST_H_
35: #define _IPC_IPC_MAREQUEST_H_
36:
37: #include <mach/kern_return.h>
38: #include <mach/port.h>
1.1.1.3 ! root 39: #include <mach_debug/hash_info.h>
! 40: #include <ipc/ipc_types.h>
1.1 root 41:
42: /*
43: * A msg-accepted request is made when MACH_SEND_NOTIFY is used
44: * to force a message to a send right. The IE_BITS_MAREQUEST bit
45: * in an entry indicates the entry is blocked because MACH_SEND_NOTIFY
46: * has already been used to force a message. The kmsg holds
47: * a pointer to the marequest; it is destroyed when the kmsg
48: * is received/destroyed. (If the send right is destroyed,
49: * this just changes imar_name. If the space is destroyed,
50: * the marequest is left unchanged.)
51: *
52: * Locking considerations: The imar_space field is read-only and
53: * points to the space which locks the imar_name field. imar_soright
54: * is read-only. Normally it is a non-null send-once right for
55: * the msg-accepted notification, but in compat mode it is null
56: * and the notification goes to the space's notify port. Normally
57: * imar_name is non-null, but if the send right is destroyed then
58: * it is changed to be null. imar_next is locked by a bucket lock;
59: * imar_name is read-only when the request is in a bucket. (So lookups
60: * in the bucket can safely check imar_space and imar_name.)
61: * imar_space and imar_soright both hold references.
62: */
63:
64: typedef struct ipc_marequest {
65: struct ipc_space *imar_space;
66: mach_port_t imar_name;
67: struct ipc_port *imar_soright;
68: struct ipc_marequest *imar_next;
69: } *ipc_marequest_t;
70:
71: #define IMAR_NULL ((ipc_marequest_t) 0)
72:
1.1.1.3 ! root 73: #define IPC_MAREQUEST_SIZE 16
1.1 root 74:
75: extern void
1.1.1.3 ! root 76: ipc_marequest_init(void);
1.1 root 77:
78: #if MACH_IPC_DEBUG
79:
80: extern unsigned int
1.1.1.3 ! root 81: ipc_marequest_info(unsigned int *, hash_info_bucket_t *, unsigned int);
1.1 root 82:
1.1.1.2 root 83: #endif /* MACH_IPC_DEBUG */
1.1 root 84:
85: extern mach_msg_return_t
1.1.1.3 ! root 86: ipc_marequest_create(ipc_space_t space, ipc_port_t port,
! 87: mach_port_t notify, ipc_marequest_t *marequestp);
1.1 root 88:
89: extern void
1.1.1.3 ! root 90: ipc_marequest_cancel(ipc_space_t space, mach_port_t name);
1.1 root 91:
92: extern void
1.1.1.3 ! root 93: ipc_marequest_rename(ipc_space_t space,
! 94: mach_port_t old, mach_port_t new);
1.1 root 95:
96: extern void
1.1.1.3 ! root 97: ipc_marequest_destroy(ipc_marequest_t marequest);
1.1 root 98:
1.1.1.2 root 99: #endif /* _IPC_IPC_MAREQUEST_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.