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