xref: /freebsd/crypto/krb5/src/plugins/kdb/db2/libdb2/hash/extern.h (revision 7f2fe78b9dd5f51c821d771b63d2e096f6fd49e9)
1*7f2fe78bSCy Schubert /*-
2*7f2fe78bSCy Schubert  * Copyright (c) 1991, 1993, 1994
3*7f2fe78bSCy Schubert  *	The Regents of the University of California.  All rights reserved.
4*7f2fe78bSCy Schubert  *
5*7f2fe78bSCy Schubert  * Redistribution and use in source and binary forms, with or without
6*7f2fe78bSCy Schubert  * modification, are permitted provided that the following conditions
7*7f2fe78bSCy Schubert  * are met:
8*7f2fe78bSCy Schubert  * 1. Redistributions of source code must retain the above copyright
9*7f2fe78bSCy Schubert  *    notice, this list of conditions and the following disclaimer.
10*7f2fe78bSCy Schubert  * 2. Redistributions in binary form must reproduce the above copyright
11*7f2fe78bSCy Schubert  *    notice, this list of conditions and the following disclaimer in the
12*7f2fe78bSCy Schubert  *    documentation and/or other materials provided with the distribution.
13*7f2fe78bSCy Schubert  * 3. All advertising materials mentioning features or use of this software
14*7f2fe78bSCy Schubert  *    must display the following acknowledgement:
15*7f2fe78bSCy Schubert  *	This product includes software developed by the University of
16*7f2fe78bSCy Schubert  *	California, Berkeley and its contributors.
17*7f2fe78bSCy Schubert  * 4. Neither the name of the University nor the names of its contributors
18*7f2fe78bSCy Schubert  *    may be used to endorse or promote products derived from this software
19*7f2fe78bSCy Schubert  *    without specific prior written permission.
20*7f2fe78bSCy Schubert  *
21*7f2fe78bSCy Schubert  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22*7f2fe78bSCy Schubert  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23*7f2fe78bSCy Schubert  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24*7f2fe78bSCy Schubert  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25*7f2fe78bSCy Schubert  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26*7f2fe78bSCy Schubert  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27*7f2fe78bSCy Schubert  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28*7f2fe78bSCy Schubert  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29*7f2fe78bSCy Schubert  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30*7f2fe78bSCy Schubert  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31*7f2fe78bSCy Schubert  * SUCH DAMAGE.
32*7f2fe78bSCy Schubert  *
33*7f2fe78bSCy Schubert  *	@(#)extern.h	8.8 (Berkeley) 11/7/95
34*7f2fe78bSCy Schubert  */
35*7f2fe78bSCy Schubert 
36*7f2fe78bSCy Schubert #define __add_bigpage		__kdb2_add_bigpage
37*7f2fe78bSCy Schubert #define __add_ovflpage		__kdb2_add_ovflpage
38*7f2fe78bSCy Schubert #define __addel			__kdb2_addel
39*7f2fe78bSCy Schubert #define __alloc_tmp		__kdb2_alloc_tmp
40*7f2fe78bSCy Schubert #define __big_delete		__kdb2_big_delete
41*7f2fe78bSCy Schubert #define __big_insert		__kdb2_big_insert
42*7f2fe78bSCy Schubert #define __big_keydata		__kdb2_big_keydata
43*7f2fe78bSCy Schubert #define __big_return		__kdb2_big_return
44*7f2fe78bSCy Schubert #define __call_hash		__kdb2_call_hash
45*7f2fe78bSCy Schubert #define __cursor_creat		__kdb2_cursor_creat
46*7f2fe78bSCy Schubert #define __delete_page		__kdb2_delete_page
47*7f2fe78bSCy Schubert #define __delpair		__kdb2_delpair
48*7f2fe78bSCy Schubert #define __expand_table		__kdb2_expand_table
49*7f2fe78bSCy Schubert #define __find_bigpair		__kdb2_find_bigpair
50*7f2fe78bSCy Schubert #define __free_ovflpage		__kdb2_free_ovflpage
51*7f2fe78bSCy Schubert #define __get_bigkey		__kdb2_get_bigkey
52*7f2fe78bSCy Schubert #define __get_buf		__kdb2_get_buf
53*7f2fe78bSCy Schubert #define __get_item		__kdb2_get_item
54*7f2fe78bSCy Schubert #define __get_item_done		__kdb2_get_item_done
55*7f2fe78bSCy Schubert #define __get_item_first	__kdb2_get_item_first
56*7f2fe78bSCy Schubert #define __get_item_next		__kdb2_get_item_next
57*7f2fe78bSCy Schubert #define __get_item_reset	__kdb2_get_item_reset
58*7f2fe78bSCy Schubert #define __get_page		__kdb2_get_page
59*7f2fe78bSCy Schubert #define __ibitmap		__kdb2_ibitmap
60*7f2fe78bSCy Schubert #define __log2			__kdb2_log2
61*7f2fe78bSCy Schubert #define __new_page		__kdb2_new_page
62*7f2fe78bSCy Schubert #define __pgin_routine		__kdb2_pgin_routine
63*7f2fe78bSCy Schubert #define __pgout_routine		__kdb2_pgout_routine
64*7f2fe78bSCy Schubert #define __put_buf		__kdb2_put_buf
65*7f2fe78bSCy Schubert #define __put_page		__kdb2_put_page
66*7f2fe78bSCy Schubert #define __reclaim_tmp		__kdb2_reclaim_tmp
67*7f2fe78bSCy Schubert #define __split_page		__kdb2_split_page
68*7f2fe78bSCy Schubert 
69*7f2fe78bSCy Schubert PAGE16	 *__add_bigpage __P((HTAB *, PAGE16 *, indx_t, const u_int8_t));
70*7f2fe78bSCy Schubert PAGE16	 *__add_ovflpage __P((HTAB *, PAGE16 *));
71*7f2fe78bSCy Schubert int32_t	  __addel __P((HTAB *, ITEM_INFO *,
72*7f2fe78bSCy Schubert 		const DBT *, const DBT *, u_int32_t, const u_int8_t));
73*7f2fe78bSCy Schubert u_int32_t __alloc_tmp __P((HTAB*));
74*7f2fe78bSCy Schubert int32_t	  __big_delete __P((HTAB *, PAGE16 *, indx_t));
75*7f2fe78bSCy Schubert int32_t	  __big_insert __P((HTAB *, PAGE16 *, const DBT *, const DBT *));
76*7f2fe78bSCy Schubert int32_t	  __big_keydata __P((HTAB *, PAGE16 *, DBT *, DBT *, int32_t));
77*7f2fe78bSCy Schubert int32_t	  __big_return __P((HTAB *, ITEM_INFO *, DBT *, int32_t));
78*7f2fe78bSCy Schubert u_int32_t __call_hash __P((HTAB *, int8_t *, int32_t));
79*7f2fe78bSCy Schubert CURSOR	 *__cursor_creat __P((const DB *));
80*7f2fe78bSCy Schubert int32_t	  __delete_page __P((HTAB *, PAGE16 *, int32_t));
81*7f2fe78bSCy Schubert int32_t	  __delpair __P((HTAB *, CURSOR *, ITEM_INFO *));
82*7f2fe78bSCy Schubert int32_t	  __expand_table __P((HTAB *));
83*7f2fe78bSCy Schubert int32_t	  __find_bigpair __P((HTAB *, CURSOR *, int8_t *, int32_t));
84*7f2fe78bSCy Schubert void	  __free_ovflpage __P((HTAB *, PAGE16 *));
85*7f2fe78bSCy Schubert int32_t	  __get_bigkey __P((HTAB *, PAGE16 *, indx_t, DBT *));
86*7f2fe78bSCy Schubert PAGE16	 *__get_buf __P((HTAB *, u_int32_t, int32_t));
87*7f2fe78bSCy Schubert u_int32_t __get_item __P((HTAB *, CURSOR *, DBT *, DBT *, ITEM_INFO *));
88*7f2fe78bSCy Schubert u_int32_t __get_item_done __P((HTAB *, CURSOR *));
89*7f2fe78bSCy Schubert u_int32_t __get_item_first __P((HTAB *, CURSOR *, DBT *, DBT *, ITEM_INFO *));
90*7f2fe78bSCy Schubert u_int32_t __get_item_next __P((HTAB *, CURSOR *, DBT *, DBT *, ITEM_INFO *));
91*7f2fe78bSCy Schubert u_int32_t __get_item_reset __P((HTAB *, CURSOR *));
92*7f2fe78bSCy Schubert PAGE16	 *__get_page __P((HTAB *, u_int32_t, int32_t));
93*7f2fe78bSCy Schubert int32_t	  __ibitmap __P((HTAB *, int32_t, int32_t, int32_t));
94*7f2fe78bSCy Schubert u_int32_t __log2 __P((u_int32_t));
95*7f2fe78bSCy Schubert int32_t	  __new_page __P((HTAB *, u_int32_t, int32_t));
96*7f2fe78bSCy Schubert void	  __pgin_routine __P((void *, db_pgno_t, void *));
97*7f2fe78bSCy Schubert void	  __pgout_routine __P((void *, db_pgno_t, void *));
98*7f2fe78bSCy Schubert u_int32_t __put_buf __P((HTAB *, PAGE16 *, u_int32_t));
99*7f2fe78bSCy Schubert int32_t	  __put_page __P((HTAB *, PAGE16 *, int32_t, int32_t));
100*7f2fe78bSCy Schubert void	  __reclaim_tmp __P((HTAB *));
101*7f2fe78bSCy Schubert int32_t	  __split_page __P((HTAB *, u_int32_t, u_int32_t));
102*7f2fe78bSCy Schubert 
103*7f2fe78bSCy Schubert /* Default hash routine. */
104*7f2fe78bSCy Schubert extern u_int32_t (*__default_hash) __P((const void *, size_t));
105*7f2fe78bSCy Schubert 
106*7f2fe78bSCy Schubert #ifdef HASH_STATISTICS
107*7f2fe78bSCy Schubert extern long hash_accesses, hash_bigpages, hash_collisions, hash_expansions;
108*7f2fe78bSCy Schubert extern long hash_overflow;
109*7f2fe78bSCy Schubert #endif
110