fix compiler warning
This commit is contained in:
parent
1b0c10b37b
commit
51911f79f2
3 changed files with 17 additions and 15 deletions
|
@ -27,6 +27,7 @@ void* worker (void* arg) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
|
|
|
@ -105,20 +105,6 @@ static int void_single_remove(void * val, struct rbtree * a) {
|
||||||
if(found) { free((void*)old); }
|
if(found) { free((void*)old); }
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
static int void_double_add(void * val, struct rbtree * a, struct rbtree * b) {
|
|
||||||
const void *old1, *old2 ;
|
|
||||||
|
|
||||||
old1 = rbdelete(val, a);
|
|
||||||
rbsearch(val, a);
|
|
||||||
int found1 = (old1 != 0);
|
|
||||||
|
|
||||||
old2 = rbdelete(val, b);
|
|
||||||
rbsearch(val,b);
|
|
||||||
assert(old1 == old2);
|
|
||||||
if(found1) { free((void*)old1); }
|
|
||||||
|
|
||||||
return found1;
|
|
||||||
}
|
|
||||||
static int void_double_remove(const void * val, struct rbtree * primary, struct rbtree * secondary) {
|
static int void_double_remove(const void * val, struct rbtree * primary, struct rbtree * secondary) {
|
||||||
const void * fullTuple= rbdelete(val, primary);
|
const void * fullTuple= rbdelete(val, primary);
|
||||||
int found1 = (fullTuple != 0);
|
int found1 = (fullTuple != 0);
|
||||||
|
@ -131,6 +117,20 @@ static int void_double_remove(const void * val, struct rbtree * primary, struct
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
static int void_double_add(void * val, struct rbtree * a, struct rbtree * b) {
|
||||||
|
// const void *old1, *old2 ;
|
||||||
|
int found = void_double_remove(val, a, b);
|
||||||
|
// old1 = rbdelete(val, a);
|
||||||
|
rbsearch(val, a);
|
||||||
|
// int found1 = (old1 != 0);
|
||||||
|
|
||||||
|
// old2 = rbdelete(val, b);
|
||||||
|
rbsearch(val,b);
|
||||||
|
// assert(old1 == old2);
|
||||||
|
// if(found1) { free((void*)old1); }
|
||||||
|
|
||||||
|
return found;
|
||||||
|
}
|
||||||
// ######## AvailablePages ###########
|
// ######## AvailablePages ###########
|
||||||
static int availablePages_remove(stasis_allocation_policy_t *ap, pageid_t pageid);
|
static int availablePages_remove(stasis_allocation_policy_t *ap, pageid_t pageid);
|
||||||
static int availablePages_add(stasis_allocation_policy_t *ap, pageid_t pageid, size_t freespace) {
|
static int availablePages_add(stasis_allocation_policy_t *ap, pageid_t pageid, size_t freespace) {
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
#ifdef STASIS_BUFFER_MANAGER_FACTORY
|
#ifdef STASIS_BUFFER_MANAGER_FACTORY
|
||||||
stasis_buffer_manager_t * stasis_buffer_manager_factory = STASIS_BUFFER_MANAGER_FACTORY;
|
stasis_buffer_manager_t * stasis_buffer_manager_factory = STASIS_BUFFER_MANAGER_FACTORY;
|
||||||
#else
|
#else
|
||||||
stasis_buffer_manager_t * (*stasis_buffer_manager_factory)(stasis_log_t*, stasis_dirty_page_table_t*) = stasis_buffer_manager_hash_factory;
|
stasis_buffer_manager_t* stasis_buffer_manager_concurrent_hash_factory(stasis_log_t *log, stasis_dirty_page_table_t *dpt);
|
||||||
|
stasis_buffer_manager_t * (*stasis_buffer_manager_factory)(stasis_log_t*, stasis_dirty_page_table_t*) = stasis_buffer_manager_concurrent_hash_factory;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BUFFER_MANAGER_O_DIRECT
|
#ifdef BUFFER_MANAGER_O_DIRECT
|
||||||
|
|
Loading…
Reference in a new issue