FreeBSD/Linux Kernel Cross Reference
sys/ipc/ipc_hash.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1993,1992,1991,1990,1989 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: ipc_hash.h,v $
29 * Revision 2.7 93/11/17 16:56:23 dbg
30 * Added ANSI function prototypes.
31 * [93/09/23 dbg]
32 *
33 * Revision 2.6 92/01/14 16:44:18 rpd
34 * Changed ipc_hash_info for CountInOut.
35 * [92/01/14 rpd]
36 *
37 * Revision 2.5 91/05/14 16:32:23 mrt
38 * Correcting copyright
39 *
40 * Revision 2.4 91/02/05 17:21:34 mrt
41 * Changed to new Mach copyright
42 * [91/02/01 15:44:52 mrt]
43 *
44 * Revision 2.3 91/01/08 15:13:35 rpd
45 * Changed ipc_info_bucket_t to hash_info_bucket_t.
46 * [91/01/02 rpd]
47 *
48 * Revision 2.2 90/06/02 14:49:51 rpd
49 * Created for new IPC.
50 * [90/03/26 20:55:01 rpd]
51 *
52 */
53 /*
54 * File: ipc/ipc_hash.h
55 * Author: Rich Draves
56 * Date: 1989
57 *
58 * Declarations of entry hash table operations.
59 */
60
61 #ifndef _IPC_IPC_HASH_H_
62 #define _IPC_IPC_HASH_H_
63
64 #include <mach_ipc_debug.h>
65
66 #include <mach/boolean.h>
67 #include <mach/kern_return.h>
68 #include <ipc/ipc_types.h>
69 #include <ipc/ipc_entry.h>
70
71 #if MACH_IPC_DEBUG
72 #include <mach_debug/hash_info.h>
73 #endif
74
75 extern void
76 ipc_hash_init(void);
77
78 #if MACH_IPC_DEBUG
79
80 extern unsigned int
81 ipc_hash_info(hash_info_bucket_t *, unsigned int);
82
83 #endif /* MACH_IPC_DEBUG */
84
85 extern boolean_t
86 ipc_hash_lookup(ipc_space_t space, ipc_object_t obj,
87 mach_port_t *namep, ipc_entry_t *entryp);
88
89 extern void
90 ipc_hash_insert(ipc_space_t space, ipc_object_t obj,
91 mach_port_t name, ipc_entry_t entry);
92
93 extern void
94 ipc_hash_delete(ipc_space_t space, ipc_object_t obj,
95 mach_port_t name, ipc_entry_t entry);
96
97 /*
98 * For use by functions that know what they're doing:
99 * the global primitives, for splay tree entries,
100 * and the local primitives, for table entries.
101 */
102
103 extern boolean_t
104 ipc_hash_global_lookup(ipc_space_t space, ipc_object_t obj,
105 mach_port_t *namep, ipc_tree_entry_t *entryp);
106
107 extern void
108 ipc_hash_global_insert(ipc_space_t space, ipc_object_t obj,
109 mach_port_t name, ipc_tree_entry_t entry);
110
111 extern void
112 ipc_hash_global_delete(ipc_space_t space, ipc_object_t obj,
113 mach_port_t name, ipc_tree_entry_t entry);
114
115 extern boolean_t
116 ipc_hash_local_lookup(ipc_space_t space, ipc_object_t obj,
117 mach_port_t *namep, ipc_entry_t *entryp);
118
119 extern void
120 ipc_hash_local_insert(ipc_space_t space, ipc_object_t obj,
121 mach_port_index_t index, ipc_entry_t entry);
122
123 extern void
124 ipc_hash_local_delete(ipc_space_t space, ipc_object_t obj,
125 mach_port_index_t index, ipc_entry_t entry);
126
127 #endif /* _IPC_IPC_HASH_H_ */
Cache object: a1c151979dfdcfbc6957da2dc409d655
|