X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fvnet%2Fvnet_hashtable.c;h=0da81bd4b714342010c2891c834aa6311d1fb199;hb=7e99758f3884f8f3d3f8895d9e4461f456331483;hp=ba9ef8ea419d87a9dd3f48e66b1b73c1b97c0d74;hpb=6cff7c8b0ec58e3b94d9583f709ca9056ae928dd;p=palacios.git diff --git a/palacios/src/vnet/vnet_hashtable.c b/palacios/src/vnet/vnet_hashtable.c index ba9ef8e..0da81bd 100644 --- a/palacios/src/vnet/vnet_hashtable.c +++ b/palacios/src/vnet/vnet_hashtable.c @@ -83,7 +83,7 @@ static inline uint_t do_hash(struct hashtable * htable, addr_t key) { #error Define GOLDEN_RATIO_PRIME for your wordsize. #endif -ulong_t v3_hash_long(ulong_t val, uint_t bits) { +ulong_t vnet_hash_long(ulong_t val, uint_t bits) { ulong_t hash = val; #ifdef __V3_64BIT__ @@ -112,7 +112,7 @@ ulong_t v3_hash_long(ulong_t val, uint_t bits) { /* HASH GENERIC MEMORY BUFFER */ /* ELF HEADER HASH FUNCTION */ -ulong_t v3_hash_buffer(uchar_t * msg, uint_t length) { +ulong_t vnet_hash_buffer(uchar_t * msg, uint_t length) { ulong_t hash = 0; ulong_t temp = 0; uint_t i; @@ -174,11 +174,11 @@ static const uint_t load_factors[] = { 32715575, 65431158, 130862298, 261724573, 523449198, 1046898282 }; -const uint_t prime_table_length = sizeof(primes) / sizeof(primes[0]); +static const uint_t prime_table_length = sizeof(primes) / sizeof(primes[0]); struct hashtable * vnet_create_htable(uint_t min_size, - uint_t (*hash_fn) (addr_t), - int (*eq_fn) (addr_t, addr_t)) { + uint_t (*hash_fn) (addr_t), + int (*eq_fn) (addr_t, addr_t)) { struct hashtable * htable; uint_t prime_index; uint_t size = primes[0];