FreeBSD/Linux Kernel Cross Reference
sys/ipc/ipc_splay.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 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_splay.h,v $
29 * Revision 2.5 91/10/09 16:10:55 af
30 * Revision 2.4.2.1 91/09/16 10:16:03 rpd
31 * Fixed typo in ipc_splay_tree_insert declaration.
32 * [91/09/02 rpd]
33 *
34 * Revision 2.4.2.1 91/09/16 10:16:03 rpd
35 * Fixed typo in ipc_splay_tree_insert declaration.
36 * [91/09/02 rpd]
37 *
38 * Revision 2.4 91/05/14 16:37:18 mrt
39 * Correcting copyright
40 *
41 * Revision 2.3 91/02/05 17:24:09 mrt
42 * Changed to new Mach copyright
43 * [91/02/01 15:51:53 mrt]
44 *
45 * Revision 2.2 90/06/02 14:51:54 rpd
46 * Created for new IPC.
47 * [90/03/26 21:04:02 rpd]
48 *
49 */
50 /*
51 * File: ipc/ipc_splay.h
52 * Author: Rich Draves
53 * Date: 1989
54 *
55 * Declarations of primitive splay tree operations.
56 */
57
58 #ifndef _IPC_IPC_SPLAY_H_
59 #define _IPC_IPC_SPLAY_H_
60
61 #include <mach/port.h>
62 #include <kern/assert.h>
63 #include <kern/macro_help.h>
64 #include <ipc/ipc_entry.h>
65
66 typedef struct ipc_splay_tree {
67 mach_port_t ist_name; /* name used in last lookup */
68 ipc_tree_entry_t ist_root; /* root of middle tree */
69 ipc_tree_entry_t ist_ltree; /* root of left tree */
70 ipc_tree_entry_t *ist_ltreep; /* pointer into left tree */
71 ipc_tree_entry_t ist_rtree; /* root of right tree */
72 ipc_tree_entry_t *ist_rtreep; /* pointer into right tree */
73 } *ipc_splay_tree_t;
74
75 #define ist_lock(splay) /* no locking */
76 #define ist_unlock(splay) /* no locking */
77
78 extern void
79 ipc_splay_tree_init(/* ipc_splay_tree_t splay */);
80
81 extern boolean_t
82 ipc_splay_tree_pick(/* ipc_splay_tree_t splay,
83 mach_port_t *namep, ipc_tree_entry_t *entryp */);
84
85 extern ipc_tree_entry_t
86 ipc_splay_tree_lookup(/* ipc_splay_tree_t splay, mach_port_t name */);
87
88 extern void
89 ipc_splay_tree_insert(/* ipc_splay_tree_t splay, mach_port_t name,
90 ipc_tree_entry_t entry */);
91
92 extern void
93 ipc_splay_tree_delete(/* ipc_splay_tree_t splay, mach_port_t name,
94 ipc_tree_entry_t entry */);
95
96 extern void
97 ipc_splay_tree_split(/* ipc_splay_tree_t splay, mach_port_t name,
98 ipc_splay_tree_t small */);
99
100 extern void
101 ipc_splay_tree_join(/* ipc_splay_tree_t splay, ipc_splay_tree_t small */);
102
103 extern void
104 ipc_splay_tree_bounds(/* ipc_splay_tree_t splay, mach_port_t name,
105 mach_port_t *lowerp, mach_port_t *upperp */);
106
107 extern ipc_tree_entry_t
108 ipc_splay_traverse_start(/* ipc_splay_tree_t splay */);
109
110 extern ipc_tree_entry_t
111 ipc_splay_traverse_next(/* ipc_splay_tree_t splay, boolean_t delete */);
112
113 extern void
114 ipc_splay_traverse_finish(/* ipc_splay_tree_t splay */);
115
116 #endif _IPC_IPC_SPLAY_H_
Cache object: 4104c25bade8b32f81a3ecd51b311549
|