modhash.h (7c478bd9) modhash.h (da14cebe)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22/*
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27#ifndef _SYS_MODHASH_H
28#define _SYS_MODHASH_H
29
23 * Use is subject to license terms.
24 */
25
26#ifndef _SYS_MODHASH_H
27#define _SYS_MODHASH_H
28
30#pragma ident "%Z%%M% %I% %E% SMI"
31
32/*
33 * Generic hash implementation for the kernel.
34 */
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39

--- 84 unchanged lines hidden (view full) ---

124 */
125int mod_hash_insert(mod_hash_t *, mod_hash_key_t, mod_hash_val_t);
126int mod_hash_replace(mod_hash_t *, mod_hash_key_t, mod_hash_val_t);
127int mod_hash_remove(mod_hash_t *, mod_hash_key_t, mod_hash_val_t *);
128int mod_hash_destroy(mod_hash_t *, mod_hash_key_t);
129int mod_hash_find(mod_hash_t *, mod_hash_key_t, mod_hash_val_t *);
130int mod_hash_find_cb(mod_hash_t *, mod_hash_key_t, mod_hash_val_t *,
131 void (*)(mod_hash_key_t, mod_hash_val_t));
29/*
30 * Generic hash implementation for the kernel.
31 */
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36

--- 84 unchanged lines hidden (view full) ---

121 */
122int mod_hash_insert(mod_hash_t *, mod_hash_key_t, mod_hash_val_t);
123int mod_hash_replace(mod_hash_t *, mod_hash_key_t, mod_hash_val_t);
124int mod_hash_remove(mod_hash_t *, mod_hash_key_t, mod_hash_val_t *);
125int mod_hash_destroy(mod_hash_t *, mod_hash_key_t);
126int mod_hash_find(mod_hash_t *, mod_hash_key_t, mod_hash_val_t *);
127int mod_hash_find_cb(mod_hash_t *, mod_hash_key_t, mod_hash_val_t *,
128 void (*)(mod_hash_key_t, mod_hash_val_t));
129int mod_hash_find_cb_rval(mod_hash_t *, mod_hash_key_t, mod_hash_val_t *,
130 int (*)(mod_hash_key_t, mod_hash_val_t), int *);
132void mod_hash_walk(mod_hash_t *,
133 uint_t (*)(mod_hash_key_t, mod_hash_val_t *, void *), void *);
134
135/*
136 * Reserving hash operations
137 */
138int mod_hash_reserve(mod_hash_t *, mod_hash_hndl_t *);
139int mod_hash_reserve_nosleep(mod_hash_t *, mod_hash_hndl_t *);
140void mod_hash_cancel(mod_hash_t *, mod_hash_hndl_t *);
141int mod_hash_insert_reserve(mod_hash_t *, mod_hash_key_t, mod_hash_val_t,
142 mod_hash_hndl_t);
143
144#endif /* _KERNEL */
145
146#ifdef __cplusplus
147}
148#endif
149
150#endif /* _SYS_MODHASH_H */
131void mod_hash_walk(mod_hash_t *,
132 uint_t (*)(mod_hash_key_t, mod_hash_val_t *, void *), void *);
133
134/*
135 * Reserving hash operations
136 */
137int mod_hash_reserve(mod_hash_t *, mod_hash_hndl_t *);
138int mod_hash_reserve_nosleep(mod_hash_t *, mod_hash_hndl_t *);
139void mod_hash_cancel(mod_hash_t *, mod_hash_hndl_t *);
140int mod_hash_insert_reserve(mod_hash_t *, mod_hash_key_t, mod_hash_val_t,
141 mod_hash_hndl_t);
142
143#endif /* _KERNEL */
144
145#ifdef __cplusplus
146}
147#endif
148
149#endif /* _SYS_MODHASH_H */