00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00028 #ifndef __include_dbprim_int_h__
00029 #define __include_dbprim_int_h__
00030
00031 #include "dbprim_err.h"
00032 #include "dbprim_version.h"
00033
00034 #ifndef DBPRIM_DOXYGEN
00035 # ifdef __GNUC__
00036 # if (__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
00037 # define __attribute__(A)
00038 # endif
00039 # else
00040 # define __attribute__(A)
00041 # endif
00042 #endif
00043
00050 #define RCSTAG(tag) static char rcsid[] __attribute__((unused)) = tag
00051
00065 unsigned long _hash_prime(unsigned long start);
00066
00079 #define _hash_rollover(mod) (((mod) * 4) / 3)
00080
00093 #define _hash_rollunder(mod) (((mod) * 3) / 4)
00094
00107 #define _hash_fuzz(mod) (((mod) * 4) / 3)
00108
00117 #define HASH_FNV_OFFSET 2166136261UL
00118
00127 #define HASH_FNV_PRIME 16777619UL
00128
00154 unsigned long _st_remove(smat_table_t *table, smat_entry_t *entry,
00155 unsigned int remflag);
00156
00165 #define ST_REM_FIRST 0x0001
00166
00175 #define ST_REM_SECOND 0x0002
00176
00184 #define ST_REM_HASH 0x0004
00185
00193 #define ST_REM_FREE 0x0008
00194
00207 smat_entry_t *_smat_alloc(void);
00208
00220 void _smat_free(smat_entry_t *entry);
00221
00235 unsigned long _smat_resize(hash_table_t *table, unsigned long new_mod);
00236
00256 rb_node_t *_rb_locate(rb_tree_t *tree, rb_node_t *node, db_key_t *key);
00257
00269 void _rb_rotate(rb_tree_t *tree, rb_node_t *child);
00270
00271 #endif