Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


moved svm_lowlevel.asm over to gas syntax in svm_lowlevel.S
[palacios.git] / palacios / src / palacios / vmm_hashtable.c
index d5e844b..612ae78 100644 (file)
@@ -125,7 +125,7 @@ ulong_t hash_long(ulong_t val, uint_t bits) {
 ulong_t hash_buffer(uchar_t * msg, uint_t length) {
   ulong_t hash = 0;
   ulong_t temp = 0;
-  int i;
+  uint_t i;
 
   for (i = 0; i < length; i++) {
     hash = (hash << 4) + *(msg + i) + i;
@@ -233,7 +233,7 @@ struct hashtable * create_hashtable(uint_t min_size,
     htable->entry_count   = 0;
     htable->hash_fn       = hash_fn;
     htable->eq_fn         = eq_fn;
-    htable->load_limit    = (uint_t) ceil((double)(size * max_load_factor));
+    htable->load_limit    = (uint_t) v3_ceil((double)(size * max_load_factor));
 
     return htable;
 }
@@ -317,7 +317,7 @@ static int hashtable_expand(struct hashtable * htable) {
 
     htable->table_length = new_size;
 
-    htable->load_limit   = (uint_t) ceil(new_size * max_load_factor);
+    htable->load_limit   = (uint_t) v3_ceil(new_size * max_load_factor);
 
     return -1;
 }