change declartions of fcn() to fcn(void)

This commit is contained in:
Rusty Sears 2012-12-04 18:17:23 -08:00
parent cafe26e728
commit b11d7fb4a7
119 changed files with 262 additions and 266 deletions

View file

@ -101,7 +101,7 @@ main(int argc, char *argv[])
}
void
env_dir_create()
env_dir_create(void)
{
struct stat sb;
@ -588,7 +588,7 @@ retry: /* Begin the transaction. */
}
void
usage()
usage(void)
{
(void)fprintf(stderr, "usage: txnapp\n");
exit(1);

View file

@ -101,7 +101,7 @@ main(int argc, char *argv[])
}
void
env_dir_create()
env_dir_create(void)
{
struct stat sb;
@ -588,7 +588,7 @@ retry: /* Begin the transaction. */
}
void
usage()
usage(void)
{
(void)fprintf(stderr, "usage: txnapp\n");
exit(1);

View file

@ -5,7 +5,7 @@ DB *db_cats;
int commitCount = 0;
int putCount = 0;
void
env_dir_create()
env_dir_create(void)
{
struct stat sb;
@ -317,7 +317,7 @@ retry: /* Begin the transaction. */
}
void
usage()
usage(void)
{
(void)fprintf(stderr, "usage: txnapp\n");
exit(1);

View file

@ -101,7 +101,7 @@ main(int argc, char *argv[])
}
void
env_dir_create()
env_dir_create(void)
{
struct stat sb;
@ -588,7 +588,7 @@ retry: /* Begin the transaction. */
}
void
usage()
usage(void)
{
(void)fprintf(stderr, "usage: txnapp\n");
exit(1);

View file

@ -91,11 +91,11 @@ int my_write_entry(struct stasis_log_t* log, LogEntry *e) {
return original_write_entry(log,e);
}
void emulate_remote_log() {
void emulate_remote_log(void) {
original_write_entry = ((stasis_log_t*)stasis_log())->write_entry;
((stasis_log_t*)stasis_log())->write_entry = my_write_entry;
}
void emulate_remote_pages() {
void emulate_remote_pages(void) {
origWrite = stasis_page_impl_get(SLOTTED_LSN_FREE_PAGE)->recordWrite;
origRead = stasis_page_impl_get(SLOTTED_LSN_FREE_PAGE)->recordRead;
// xxx a bit of cheating; don't pay latency for lsn write

View file

@ -16,7 +16,7 @@ static void my_pread_help(int fd, long long off) {
}
}
static void drop_buffers() {
static void drop_buffers(void) {
int fd = open("/proc/sys/vm/drop_caches", O_TRUNC|O_WRONLY);
if(fd == -1) { perror("Couldn't drop page cache"); abort(); }
char * str = "1\n";

View file

@ -815,7 +815,7 @@ lladdIterator_t* ReferentialAlgebra_ExecuteQuery(int xid,
/**
Initialize module (Must be called before anything else in this file).
*/
void ReferentialAlgebra_init() {
void ReferentialAlgebra_init(void) {
lladdIterator_def_t select_def = {
s_close, s_next, s_tryNext, s_key, s_value, s_tupleDone
};

View file

@ -103,7 +103,7 @@ void tupleFree(tuple_t tup) {
if(tup.type) { free(tup.type); }
}
tuple_t tupleAlloc() {
tuple_t tupleAlloc(void) {
tuple_t ret;
ret.count = 0;
ret.type = 0;

View file

@ -67,7 +67,7 @@ debug_f_start (const char *func_str)
}
int
debug_f_end ()
debug_f_end (void)
{
if (g_ncontexts == 0)
return -1;

View file

@ -453,7 +453,7 @@ static int xidAllocedDealloced_cmp_xid_pageid(const void *ap, const void *bp, co
((a->pageid > b->pageid) ? 1 : 0)));
}
stasis_allocation_policy_t * stasis_allocation_policy_init() {
stasis_allocation_policy_t * stasis_allocation_policy_init(void) {
stasis_allocation_policy_t * ap = stasis_alloc(stasis_allocation_policy_t);
ap->availablePages_key_pageid = rbinit(availablePages_cmp_pageid, 0);
ap->availablePages_key_freespace_pageid = rbinit(availablePages_cmp_freespace_pageid, 0);

View file

@ -96,7 +96,7 @@ stasis_buffer_manager_t* stasis_buffer_manager_deprecated_open(stasis_page_handl
return bm;
}
static void bufManBufDeinit() {
static void bufManBufDeinit(void) {
DEBUG("pageCacheDeinit()");
@ -130,7 +130,7 @@ static void bufManBufDeinit() {
Just close file descriptors, don't do any other clean up. (For
testing.)
*/
static void bufManSimulateBufferManagerCrash() {
static void bufManSimulateBufferManagerCrash(void) {
page_handle->close(page_handle);
#ifdef PIN_COUNT
pinCount = 0;

View file

@ -38,7 +38,7 @@ void pageCacheInit(Page * first) {
}
void pageCacheDeinit() {
void pageCacheDeinit(void) {
}
@ -163,6 +163,6 @@ void cacheHitOnPage(Page * ret) {
}
}
Page * cacheStalePage() {
Page * cacheStalePage(void) {
return repTail;
}

View file

@ -80,7 +80,7 @@ static int paCloseHandle(stasis_buffer_manager_t *bm, stasis_buffer_manager_hand
return 0; // no error.
}
stasis_buffer_manager_t * stasis_buffer_manager_mem_array_open () {
stasis_buffer_manager_t * stasis_buffer_manager_mem_array_open (void) {
stasis_buffer_manager_t * bm = stasis_alloc(stasis_buffer_manager_t);
stasis_buffer_manager_page_array_t * pa = stasis_alloc(stasis_buffer_manager_page_array_t);

View file

@ -62,7 +62,7 @@ struct stasis_buffer_pool_t {
void * addr_to_free;
};
stasis_buffer_pool_t* stasis_buffer_pool_init() {
stasis_buffer_pool_t* stasis_buffer_pool_init(void) {
stasis_buffer_pool_t * ret = stasis_alloc(stasis_buffer_pool_t);

View file

@ -343,7 +343,7 @@ void stasis_dirty_page_table_set_buffer_manager(stasis_dirty_page_table_t * dpt,
dpt->bufferManager = bufferManager;
}
stasis_dirty_page_table_t * stasis_dirty_page_table_init() {
stasis_dirty_page_table_t * stasis_dirty_page_table_init(void) {
stasis_dirty_page_table_t * ret = stasis_alloc(stasis_dirty_page_table_t);
ret->outstanding_flush_lsns = stasis_util_multiset_create();

View file

@ -63,7 +63,7 @@ typedef struct {
static void noopTupDone(int xid, void * foo) { }
void stasis_arrayCollection_init() {
void stasis_arrayCollection_init(void) {
lladdIterator_def_t array_def = {
arrayIterator_close,
arrayIterator_next,

View file

@ -9,7 +9,7 @@ static void lladdConsumer_register(int type, lladdConsumer_def_t info) {
consumers[type] = info;
}
void consumer_init() {
void consumer_init(void) {
lladdConsumer_def_t logMemory_def = {
logMemory_consumer_push,
logMemory_consumer_close

View file

@ -241,7 +241,7 @@ lladdFifoPool_t * lladdFifoPool_pointerPoolInit (int consumerCount, int pointerC
return pool;
}
void stasis_fifo_init() {
void stasis_fifo_init(void) {
lladdIterator_def_t pointer_def = {
lladdFifoPool_iterator_close,
lladdFifoPool_iterator_next,

View file

@ -112,7 +112,7 @@ static int stasis_log_structured_group_it_value(int xid, void* impl, byte** val)
}
static void stasis_log_structured_group_it_tupleDone(int xid, void* impl) {}
void stasis_log_structured_group_init() {
void stasis_log_structured_group_init(void) {
static lladdIterator_def_t def = {
stasis_log_structured_group_it_close,
stasis_log_structured_group_it_next,

View file

@ -73,7 +73,7 @@ typedef struct {
int active;
} lock;
void lockManagerInitHashed() {
void lockManagerInitHashed(void) {
int i = 0;
for(i = 0; i < MUTEX_COUNT; i++) {
pthread_mutex_init(&mutexes[i], NULL);
@ -356,7 +356,7 @@ int lockManagerCommitPages(int xid) {
return lockManagerCommitHashed(xid, sizeof(pageid_t));
}
void setupLockManagerCallbacksPage() {
void setupLockManagerCallbacksPage(void) {
globalLockManager.init = &lockManagerInitHashed;
globalLockManager.readLockPage = &lockManagerReadLockPage;
globalLockManager.writeLockPage = &lockManagerWriteLockPage;
@ -371,7 +371,7 @@ void setupLockManagerCallbacksPage() {
globalLockManager.init();
}
void setupLockManagerCallbacksRecord () {
void setupLockManagerCallbacksRecord (void) {
globalLockManager.init = &lockManagerInitHashed;
globalLockManager.readLockPage = NULL;
globalLockManager.writeLockPage = NULL;

View file

@ -17,7 +17,7 @@ typedef struct {
lsn_t eof;
} logMemory_fifo_t;
void stasis_logMemory_init() {
void stasis_logMemory_init(void) {
lladdIterator_def_t logMemory_def = {
logMemory_Iterator_close,
logMemory_Iterator_next,

View file

@ -768,7 +768,7 @@ static void lsmPageCleanup(Page *p) {
/**
A page_impl for the root of an lsmTree.
*/
page_impl lsmRootImpl() {
page_impl lsmRootImpl(void) {
page_impl pi = stasis_page_fixed_impl();
pi.pageLoaded = lsmPageLoaded;
pi.pageFlushed = lsmPageFlushed;

View file

@ -18,6 +18,6 @@
#include <assert.h>
#include <stdio.h>
stasis_handle_t* stasis_handle_default_factory() {
stasis_handle_t* stasis_handle_default_factory(void) {
return stasis_handle_file_factory(stasis_store_file_name, O_CREAT | O_RDWR | stasis_buffer_manager_io_handle_flags, FILE_PERM);
}

View file

@ -182,7 +182,7 @@ struct stasis_handle_t mem_func = {
.error = 0
};
stasis_handle_t * stasis_handle(open_memory)() {
stasis_handle_t * stasis_handle(open_memory)(void) {
stasis_handle_t * ret = stasis_alloc(stasis_handle_t);
if(!ret) { return NULL; }
*ret = mem_func;

View file

@ -204,7 +204,7 @@ stasis_handle_t * stasis_handle_open_raid0(int handle_count, stasis_handle_t** h
return ret;
}
stasis_handle_t * stasis_handle_raid0_factory() {
stasis_handle_t * stasis_handle_raid0_factory(void) {
if(stasis_handle_raid0_filenames == NULL) {
stasis_handle_t * h[2];
h[0] = stasis_handle_file_factory(stasis_store_file_1_name, O_CREAT | O_RDWR | stasis_buffer_manager_io_handle_flags, FILE_PERM);

View file

@ -157,7 +157,7 @@ stasis_handle_t * stasis_handle_open_raid1(stasis_handle_t* a, stasis_handle_t*
return ret;
}
stasis_handle_t * stasis_handle_raid1_factory() {
stasis_handle_t * stasis_handle_raid1_factory(void) {
stasis_handle_t * a = stasis_handle_file_factory(stasis_store_file_1_name, O_CREAT | O_RDWR | stasis_buffer_manager_io_handle_flags, FILE_PERM);
stasis_handle_t * b = stasis_handle_file_factory(stasis_store_file_2_name, O_CREAT | O_RDWR | stasis_buffer_manager_io_handle_flags, FILE_PERM);
return stasis_handle_open_raid1(a, b);

View file

@ -12,7 +12,7 @@ void lladdIterator_register(int type, lladdIterator_def_t info) {
iterators[type] = info;
}
void iterator_init() {
void iterator_init(void) {
/* no-op */
}

View file

@ -9,7 +9,7 @@
LockManagerSetup globalLockManager;
void setupLockManagerCallbacksNil () {
void setupLockManagerCallbacksNil (void) {
globalLockManager.init = NULL;
globalLockManager.readLockPage = NULL;
globalLockManager.writeLockPage = NULL;

View file

@ -188,7 +188,7 @@ static void stasis_log_impl_in_memory_set_truncation(stasis_log_t *log, stasis_t
impl->trunc = trunc;
}
stasis_log_t* stasis_log_impl_in_memory_open() {
stasis_log_t* stasis_log_impl_in_memory_open(void) {
stasis_log_impl_in_memory * impl = stasis_alloc(stasis_log_impl_in_memory);
impl->flushedLSN_lock = initlock();
impl->globalOffset_lock = initlock();

View file

@ -56,7 +56,7 @@ void stasis_operation_impl_register(stasis_operation_impl o) {
stasis_operation_table[o.id] = o;
}
static int stasis_operations_initted = 0;
void stasis_operation_table_init() {
void stasis_operation_table_init(void) {
if(!stasis_operations_initted) {
stasis_operations_initted = 1;
for(int i = 0; i < MAX_OPERATIONS; i++) {

View file

@ -168,7 +168,7 @@ static int op_realloc(const LogEntry* e, Page* p) {
return ret;
}
stasis_operation_impl stasis_op_impl_alloc() {
stasis_operation_impl stasis_op_impl_alloc(void) {
stasis_operation_impl o = {
OPERATION_ALLOC,
UNKNOWN_TYPE_PAGE,
@ -180,7 +180,7 @@ stasis_operation_impl stasis_op_impl_alloc() {
}
stasis_operation_impl stasis_op_impl_dealloc() {
stasis_operation_impl stasis_op_impl_dealloc(void) {
stasis_operation_impl o = {
OPERATION_DEALLOC,
UNKNOWN_TYPE_PAGE,
@ -192,7 +192,7 @@ stasis_operation_impl stasis_op_impl_dealloc() {
}
/*This is only used to undo deallocs... */
stasis_operation_impl stasis_op_impl_realloc() {
stasis_operation_impl stasis_op_impl_realloc(void) {
stasis_operation_impl o = {
OPERATION_REALLOC,
UNKNOWN_TYPE_PAGE,

View file

@ -98,7 +98,7 @@ static int array_list_op_init_header(const LogEntry* e, Page* p) {
/*----------------------------------------------------------------------------*/
stasis_operation_impl stasis_op_impl_array_list_header_init() {
stasis_operation_impl stasis_op_impl_array_list_header_init(void) {
stasis_operation_impl o = {
OPERATION_ARRAY_LIST_HEADER_INIT,
UNINITIALIZED_PAGE,

View file

@ -25,7 +25,7 @@ static int stasis_btree_byte_array_comparator(const void * a, size_t alen, const
return ret;
}
void BtreeInit() {
void BtreeInit(void) {
// todo: register iterator
// register comparators
@ -33,7 +33,7 @@ void BtreeInit() {
btree_comparators[BYTE_ARRAY_COMPARATOR] = stasis_btree_byte_array_comparator;
}
void BtreeDeinit() {
void BtreeDeinit(void) {
free(btree_comparators);
}
typedef struct {

View file

@ -81,7 +81,7 @@ static void stasis_page_blob_flushed(Page *p) {
}
static void stasis_page_blob_cleanup(Page *p) { }
page_impl stasis_page_blob_impl() {
page_impl stasis_page_blob_impl(void) {
page_impl pi = {
BLOB_PAGE,
1,

View file

@ -60,7 +60,7 @@ static int op_decrement(const LogEntry* e, Page* p) {
return 0;
}
stasis_operation_impl stasis_op_impl_decrement() {
stasis_operation_impl stasis_op_impl_decrement(void) {
stasis_operation_impl o = {
OPERATION_DECREMENT,
UNKNOWN_TYPE_PAGE,

View file

@ -61,7 +61,7 @@ static int op_increment(const LogEntry* e, Page* p) {
return 0;
}
stasis_operation_impl stasis_op_impl_increment() {
stasis_operation_impl stasis_op_impl_increment(void) {
stasis_operation_impl o = {
OPERATION_INCREMENT,
UNKNOWN_TYPE_PAGE,

View file

@ -35,7 +35,7 @@ typedef struct {
static void noopTupDone(int xid, void * foo) { }
void LinearHashNTAInit() {
void LinearHashNTAInit(void) {
// only need this function since PTHREAD_RECURSIVE_MUTEX_INITIALIZER is really broken...
pthread_mutexattr_t attr;
pthread_mutexattr_init(&attr);
@ -53,7 +53,7 @@ void LinearHashNTAInit() {
};
lladdIterator_register(LINEAR_HASH_NTA_ITERATOR, linearHashNTA_def);
}
void LinearHashNTADeinit() {
void LinearHashNTADeinit(void) {
pthread_mutex_destroy(&linear_hash_mutex);
}
@ -143,7 +143,7 @@ static int op_linear_hash_remove(const LogEntry* e, Page* p) {
return 0;
}
stasis_operation_impl stasis_op_impl_linear_hash_insert() {
stasis_operation_impl stasis_op_impl_linear_hash_insert(void) {
stasis_operation_impl o = {
OPERATION_LINEAR_HASH_INSERT,
UNKNOWN_TYPE_PAGE,
@ -153,7 +153,7 @@ stasis_operation_impl stasis_op_impl_linear_hash_insert() {
};
return o;
}
stasis_operation_impl stasis_op_impl_linear_hash_remove() {
stasis_operation_impl stasis_op_impl_linear_hash_remove(void) {
stasis_operation_impl o = {
OPERATION_LINEAR_HASH_REMOVE,
UNKNOWN_TYPE_PAGE,

View file

@ -33,7 +33,7 @@
static pthread_mutex_t stasis_linked_list_mutex;
void TlinkedListNTAInit() {
void TlinkedListNTAInit(void) {
// only need this function since PTHREAD_RECURSIVE_MUTEX_INITIALIZER is really broken...
pthread_mutexattr_t attr;
pthread_mutexattr_init(&attr);
@ -41,7 +41,7 @@ void TlinkedListNTAInit() {
pthread_mutex_init(&stasis_linked_list_mutex, &attr);
pthread_mutexattr_destroy(&attr);
}
void TlinkedListNTADeinit() {
void TlinkedListNTADeinit(void) {
pthread_mutex_destroy(&stasis_linked_list_mutex);
}
@ -123,7 +123,7 @@ int TlinkedListInsert(int xid, recordid list, const byte * key, int keySize, con
return ret;
}
stasis_operation_impl stasis_op_impl_linked_list_insert() {
stasis_operation_impl stasis_op_impl_linked_list_insert(void) {
stasis_operation_impl o = {
OPERATION_LINKED_LIST_INSERT,
UNKNOWN_TYPE_PAGE,
@ -133,7 +133,7 @@ stasis_operation_impl stasis_op_impl_linked_list_insert() {
};
return o;
}
stasis_operation_impl stasis_op_impl_linked_list_remove() {
stasis_operation_impl stasis_op_impl_linked_list_remove(void) {
stasis_operation_impl o = {
OPERATION_LINKED_LIST_REMOVE,
UNKNOWN_TYPE_PAGE,

View file

@ -94,7 +94,7 @@ int TsetWriteBack(int xid, pageid_t page, pageoff_t off, pageoff_t len, const vo
return TsetReorderableWriteBack(xid,0,page,off,len,dat,olddat);
}
stasis_operation_impl stasis_op_impl_lsn_free_set() {
stasis_operation_impl stasis_op_impl_lsn_free_set(void) {
stasis_operation_impl o = {
OPERATION_SET_LSN_FREE,
SLOTTED_LSN_FREE_PAGE,
@ -105,7 +105,7 @@ stasis_operation_impl stasis_op_impl_lsn_free_set() {
return o;
}
stasis_operation_impl stasis_op_impl_lsn_free_set_inverse() {
stasis_operation_impl stasis_op_impl_lsn_free_set_inverse(void) {
stasis_operation_impl o = {
OPERATION_SET_LSN_FREE_INVERSE,
SLOTTED_LSN_FREE_PAGE,

View file

@ -390,11 +390,11 @@ recordid TnaiveHashCreate(int xid, int keySize, int valSize) {
return rid;
}
void TnaiveHashInit() {
void TnaiveHashInit(void) {
openHashes = pblHtCreate();
}
void TnaiveHashDeinit() {
void TnaiveHashDeinit(void) {
pblHtDelete(openHashes);
}

View file

@ -52,7 +52,7 @@ int noop(const LogEntry* e, Page* p) {
return 0;
}
stasis_operation_impl stasis_op_impl_noop() {
stasis_operation_impl stasis_op_impl_noop(void) {
stasis_operation_impl o = {
OPERATION_NOOP,
UNKNOWN_TYPE_PAGE,

View file

@ -150,7 +150,7 @@ int TpageGetType(int xid, pageid_t page) {
*/
stasis_operation_impl stasis_op_impl_page_set_range() {
stasis_operation_impl stasis_op_impl_page_set_range(void) {
stasis_operation_impl o = {
OPERATION_PAGE_SET_RANGE,
UNKNOWN_TYPE_PAGE,
@ -161,7 +161,7 @@ stasis_operation_impl stasis_op_impl_page_set_range() {
return o;
}
stasis_operation_impl stasis_op_impl_page_set_range_inverse() {
stasis_operation_impl stasis_op_impl_page_set_range_inverse(void) {
stasis_operation_impl o = {
OPERATION_PAGE_SET_RANGE_INVERSE,
UNKNOWN_TYPE_PAGE,
@ -262,7 +262,7 @@ int TinitializeBlobPageRange(int xid, pageid_t start, pageid_t count) {
Tupdate(xid, MULTI_PAGEID, &arg, sizeof(arg), OPERATION_INITIALIZE_MULTIPAGE);
return 0;
}
stasis_operation_impl stasis_op_impl_page_initialize() {
stasis_operation_impl stasis_op_impl_page_initialize(void) {
stasis_operation_impl o = {
OPERATION_INITIALIZE_PAGE,
UNINITIALIZED_PAGE,
@ -272,7 +272,7 @@ stasis_operation_impl stasis_op_impl_page_initialize() {
};
return o;
}
stasis_operation_impl stasis_op_impl_multipage_initialize() {
stasis_operation_impl stasis_op_impl_multipage_initialize(void) {
stasis_operation_impl o = {
OPERATION_INITIALIZE_MULTIPAGE,
MULTI_PAGE,

View file

@ -59,7 +59,7 @@ static int op_prepare(const LogEntry * e, Page * p) {
return 0;
}
stasis_operation_impl stasis_op_impl_prepare() {
stasis_operation_impl stasis_op_impl_prepare(void) {
stasis_operation_impl o = {
OPERATION_PREPARE, /* id */
UNKNOWN_TYPE_PAGE,
@ -79,7 +79,7 @@ typedef struct{
int aborted;
} PrepareGuardState;
void * getPrepareGuardState() {
void * getPrepareGuardState(void) {
PrepareGuardState * s = stasis_alloc(PrepareGuardState);
s->continueIterating = 1;
s->prevLSN = -1;

View file

@ -512,7 +512,7 @@ void TregionPrefetch(int xid, pageid_t firstPage) {
pageid_t endOfRange = firstPage + TregionSize(xid, firstPage);
bm->prefetchPages(bm, firstPage, endOfRange);
}
stasis_operation_impl stasis_op_impl_boundary_tag_alloc() {
stasis_operation_impl stasis_op_impl_boundary_tag_alloc(void) {
stasis_operation_impl o = {
OPERATION_ALLOC_BOUNDARY_TAG,
UNINITIALIZED_PAGE,
@ -523,7 +523,7 @@ stasis_operation_impl stasis_op_impl_boundary_tag_alloc() {
return o;
}
stasis_operation_impl stasis_op_impl_region_alloc() {
stasis_operation_impl stasis_op_impl_region_alloc(void) {
stasis_operation_impl o = {
OPERATION_ALLOC_REGION,
UNKNOWN_TYPE_PAGE,
@ -533,7 +533,7 @@ stasis_operation_impl stasis_op_impl_region_alloc() {
};
return o;
}
stasis_operation_impl stasis_op_impl_region_alloc_inverse() {
stasis_operation_impl stasis_op_impl_region_alloc_inverse(void) {
stasis_operation_impl o = {
OPERATION_ALLOC_REGION_INVERSE,
UNKNOWN_TYPE_PAGE,
@ -543,7 +543,7 @@ stasis_operation_impl stasis_op_impl_region_alloc_inverse() {
};
return o;
}
stasis_operation_impl stasis_op_impl_region_dealloc() {
stasis_operation_impl stasis_op_impl_region_dealloc(void) {
stasis_operation_impl o = {
OPERATION_DEALLOC_REGION,
UNKNOWN_TYPE_PAGE,
@ -554,7 +554,7 @@ stasis_operation_impl stasis_op_impl_region_dealloc() {
return o;
}
stasis_operation_impl stasis_op_impl_region_dealloc_inverse() {
stasis_operation_impl stasis_op_impl_region_dealloc_inverse(void) {
stasis_operation_impl o = {
OPERATION_DEALLOC_REGION_INVERSE,
UNKNOWN_TYPE_PAGE,

View file

@ -127,7 +127,7 @@ static int op_segment_file_pwrite_inverse(const LogEntry* e, Page* p) {
return 0;
}
stasis_operation_impl stasis_op_impl_segment_file_pwrite() {
stasis_operation_impl stasis_op_impl_segment_file_pwrite(void) {
static stasis_operation_impl o = {
OPERATION_SEGMENT_FILE_PWRITE,
SEGMENT_PAGE,
@ -138,7 +138,7 @@ stasis_operation_impl stasis_op_impl_segment_file_pwrite() {
return o;
}
stasis_operation_impl stasis_op_impl_segment_file_pwrite_inverse() {
stasis_operation_impl stasis_op_impl_segment_file_pwrite_inverse(void) {
static stasis_operation_impl o = {
OPERATION_SEGMENT_FILE_PWRITE_INVERSE,
SEGMENT_PAGE,

View file

@ -221,7 +221,7 @@ void TsetRange(int xid, recordid rid, int offset, int length, const void * dat)
releasePage(p);
}
stasis_operation_impl stasis_op_impl_set() {
stasis_operation_impl stasis_op_impl_set(void) {
stasis_operation_impl o = {
OPERATION_SET,
UNKNOWN_TYPE_PAGE,
@ -232,7 +232,7 @@ stasis_operation_impl stasis_op_impl_set() {
return o;
}
stasis_operation_impl stasis_op_impl_set_inverse() {
stasis_operation_impl stasis_op_impl_set_inverse(void) {
stasis_operation_impl o = {
OPERATION_SET_INVERSE,
UNKNOWN_TYPE_PAGE,
@ -243,7 +243,7 @@ stasis_operation_impl stasis_op_impl_set_inverse() {
return o;
}
stasis_operation_impl stasis_op_impl_set_range() {
stasis_operation_impl stasis_op_impl_set_range(void) {
stasis_operation_impl o = {
OPERATION_SET_RANGE,
UNKNOWN_TYPE_PAGE,
@ -254,7 +254,7 @@ stasis_operation_impl stasis_op_impl_set_range() {
return o;
}
stasis_operation_impl stasis_op_impl_set_range_inverse() {
stasis_operation_impl stasis_op_impl_set_range_inverse(void) {
stasis_operation_impl o = {
OPERATION_SET_RANGE_INVERSE,
UNKNOWN_TYPE_PAGE,

View file

@ -122,7 +122,7 @@ void stasis_page_init(stasis_dirty_page_table_t * dpt) {
stasis_page_impl_register(stasis_page_slotted_latch_free_impl());
}
void stasis_page_deinit() {
void stasis_page_deinit(void) {
for(int i = 0; i < MAX_PAGE_TYPE; i++) {
page_impl p = { 0 };

View file

@ -114,7 +114,7 @@ static void stasis_page_fixed_flushed(Page *p) {
}
static void stasis_page_fixed_cleanup(Page *p) { }
page_impl stasis_page_fixed_impl() {
page_impl stasis_page_fixed_impl(void) {
static page_impl pi = {
FIXED_PAGE,
1,
@ -150,11 +150,11 @@ page_impl stasis_page_fixed_impl() {
/**
@todo arrayListImpl belongs in arrayList.c
*/
page_impl stasis_page_array_list_impl() {
page_impl stasis_page_array_list_impl(void) {
page_impl pi = stasis_page_fixed_impl();
pi.page_type = ARRAY_LIST_PAGE;
return pi;
}
void stasis_page_fixed_init() { }
void stasis_page_fixed_deinit() { }
void stasis_page_fixed_init(void) { }
void stasis_page_fixed_deinit(void) { }

View file

@ -7,7 +7,7 @@ void stasis_page_slotted_lsn_free_initialize_page(Page * p) {
p->pageType = SLOTTED_LSN_FREE_PAGE;
}
page_impl slottedLsnFreeImpl() {
page_impl slottedLsnFreeImpl(void) {
page_impl pi = stasis_page_slotted_impl();
pi.has_header = 0;
pi.page_type = SLOTTED_LSN_FREE_PAGE;

View file

@ -9,7 +9,7 @@
static int notSupported(int xid, Page * p) { return 0; }
page_impl segmentImpl() {
page_impl segmentImpl(void) {
static page_impl pi = {
SEGMENT_PAGE,
0, // has header

View file

@ -141,7 +141,7 @@ void stasis_page_slotted_initialize_page(Page * page) {
stasis_page_slotted_initialize_page_raw(page);
}
void stasis_page_slotted_init() {
void stasis_page_slotted_init(void) {
#ifdef SLOTTED_PAGE_CHECK_FOR_OVERLAP
#ifdef SLOTTED_PAGE_OLD_CHECKS
printf("slotted.c: Using expensive page sanity checking.\n");
@ -149,10 +149,10 @@ void stasis_page_slotted_init() {
#endif
}
void stasis_page_slotted_deinit() {
void stasis_page_slotted_deinit(void) {
}
page_impl stasis_page_slotted_impl() {
page_impl stasis_page_slotted_impl(void) {
static page_impl pi = {
SLOTTED_PAGE,
1,
@ -185,7 +185,7 @@ static page_impl pi = {
return pi;
}
page_impl stasis_page_boundary_tag_impl() {
page_impl stasis_page_boundary_tag_impl(void) {
page_impl p = stasis_page_slotted_impl();
p.page_type = BOUNDARY_TAG_PAGE;
return p;

View file

@ -21,7 +21,7 @@ static void uninitializedCleanup(Page *p) {
}
page_impl stasis_page_uninitialized_impl() {
page_impl stasis_page_uninitialized_impl(void) {
static page_impl pi = {
UNINITIALIZED_PAGE,
1, //has header

View file

@ -86,7 +86,7 @@ static void stasis_replacement_policy_lru_insert(replacementPolicy* r, Page* p)
assert(e == old);
}
replacementPolicy * stasis_replacement_policy_lru_init() {
replacementPolicy * stasis_replacement_policy_lru_init(void) {
replacementPolicy * ret = stasis_alloc(replacementPolicy);
stasis_replacement_policy_lru_t * l = stasis_alloc(stasis_replacement_policy_lru_t);
l->now = 0;

View file

@ -109,7 +109,7 @@ static void stasis_lru_fast_deinit(struct replacementPolicy * r) {
free(l);
free(r);
}
replacementPolicy * lruFastInit() {
replacementPolicy * lruFastInit(void) {
struct replacementPolicy * ret = stasis_alloc(struct replacementPolicy);
ret->deinit = stasis_lru_fast_deinit;
ret->hit = stasis_lru_fast_hit;

View file

@ -187,7 +187,7 @@ int* stasis_transaction_table_list_active(stasis_transaction_table_t *tbl, int *
return ret;
}
stasis_transaction_table_t * stasis_transaction_table_init() {
stasis_transaction_table_t * stasis_transaction_table_init(void) {
stasis_transaction_table_t * tbl = stasis_alloc(stasis_transaction_table_t);
tbl->active_count = 0;

View file

@ -38,20 +38,20 @@ static stasis_alloc_t * stasis_alloc = 0;
static stasis_allocation_policy_t * stasis_allocation_policy = 0;
static stasis_buffer_manager_t * stasis_buffer_manager = 0;
void * stasis_runtime_buffer_manager() {
void * stasis_runtime_buffer_manager(void) {
return stasis_buffer_manager;
}
void * stasis_runtime_dirty_page_table() {
void * stasis_runtime_dirty_page_table(void) {
return stasis_dirty_page_table;
}
void * stasis_runtime_transaction_table() {
void * stasis_runtime_transaction_table(void) {
return stasis_transaction_table;
}
void * stasis_runtime_alloc_state() {
void * stasis_runtime_alloc_state(void) {
return stasis_alloc;
}
stasis_log_t* stasis_log_default_factory() {
stasis_log_t* stasis_log_default_factory(void) {
stasis_log_t *log_file = 0;
if(LOG_TO_DIR == stasis_log_type) {
log_file = stasis_log_file_pool_open(stasis_log_dir_name,
@ -71,7 +71,7 @@ stasis_log_t* stasis_log_default_factory() {
return log_file;
}
int Tinit() {
int Tinit(void) {
stasis_initted = 1;
stasis_operation_table_init();
@ -109,7 +109,7 @@ int Tinit() {
return 0;
}
int Tbegin() {
int Tbegin(void) {
assert(stasis_initted);
@ -327,7 +327,7 @@ int Tcommit(int xid) {
int TsoftCommit(int xid) {
return TcommitHelper(xid, 0); // 0 -> don't force write log.
}
void TforceCommits() {
void TforceCommits(void) {
stasis_log_force(stasis_log_file, INVALID_LSN, LOG_FORCE_COMMIT);
}
@ -372,7 +372,7 @@ int Tforget(int xid) {
stasis_transaction_table_forget(stasis_transaction_table, t->xid);
return 0;
}
int Tdeinit() {
int Tdeinit(void) {
int count;
int * active = stasis_transaction_table_list_active(stasis_transaction_table, &count);
@ -412,7 +412,7 @@ int Tdeinit() {
return 0;
}
int TuncleanShutdown() {
int TuncleanShutdown(void) {
// We're simulating a crash; don't complain when writes get lost,
// and active transactions get rolled back.
stasis_suppress_unclean_shutdown_warnings = 1;
@ -436,7 +436,7 @@ int TuncleanShutdown() {
return 0;
}
int TdurabilityLevel() {
int TdurabilityLevel(void) {
if(stasis_buffer_manager_factory == stasis_buffer_manager_mem_array_factory) {
return VOLATILE;
} else if(stasis_log_type == LOG_TO_MEMORY) {
@ -446,7 +446,7 @@ int TdurabilityLevel() {
}
}
void TtruncateLog() {
void TtruncateLog(void) {
stasis_truncation_truncate(stasis_truncation, 1);
}
typedef struct {
@ -518,6 +518,6 @@ int TisActiveTransaction(stasis_transaction_fingerprint_t * fp) {
&& stasis_transaction_table_get(stasis_transaction_table, fp->xid)->recLSN == fp->rec_lsn;
}
void * stasis_log() {
void * stasis_log(void) {
return stasis_log_file;
}

View file

@ -402,7 +402,7 @@ void LH_ENTRY(destroy) (struct LH_ENTRY(table) * t) {
free(t);
}
void LH_ENTRY(stats)(){
void LH_ENTRY(stats)(void) {
#ifdef MEASURE_GLOBAL_BUCKET_LENGTH
pthread_mutex_lock(&stat_mutex);

View file

@ -7,7 +7,7 @@ struct stasis_util_multiset_t {
intptr_t item_count;
};
stasis_util_multiset_t * stasis_util_multiset_create() {
stasis_util_multiset_t * stasis_util_multiset_create(void) {
stasis_util_multiset_t * set = stasis_alloc(stasis_util_multiset_t);
set->items = stasis_alloc(lsn_t);
set->item_count = 0;

View file

@ -72,7 +72,7 @@ static void RB_ENTRY(_free)(struct RB_ENTRY(node) *);
#else
static struct RB_ENTRY(node) *RB_ENTRY(_alloc)() {return (struct RB_ENTRY(node) *) malloc(sizeof(struct RB_ENTRY(node)));}
static struct RB_ENTRY(node) *RB_ENTRY(_alloc)(void) {return (struct RB_ENTRY(node) *) malloc(sizeof(struct RB_ENTRY(node)));}
static void RB_ENTRY(_free)(struct RB_ENTRY(node) *x) {free(x);}
#endif
@ -926,8 +926,7 @@ static struct RB_ENTRY(node) *rbfreep=NULL;
#define RB_ENTRY(NODE)ALLOC_CHUNK_SIZE 1000
static struct RB_ENTRY(node) *
RB_ENTRY(_alloc)()
{
RB_ENTRY(_alloc)(void) {
struct RB_ENTRY(node) *x;
int i;

View file

@ -42,7 +42,7 @@ terms specified in this license.
#include <sys/time.h>
#include <stdio.h>
int main() {
int main(void) {
unsigned long l;
struct timeval t;

View file

@ -51,7 +51,7 @@ static const slot_index_t INVALID_COL = UCHAR_MAX;
*/
template <class PAGEFORMAT, class COMPRESSOR, class TYPE>
inline plugin_id_t plugin_id() {
inline plugin_id_t plugin_id(void) {
/* type_idx maps from sizeof(TYPE) to a portion of a page type:
(u)int8_t -> 0

View file

@ -62,7 +62,7 @@ class For {
The size of the scratch space reserved at the end of the page for
speculative execution.
*/
inline size_t max_overrun() { return sizeof(delta_t) + sizeof(TYPE); }
inline size_t max_overrun(void) { return sizeof(delta_t) + sizeof(TYPE); }
/**
Append a new value to a compressed portion of a page. This
@ -128,7 +128,7 @@ class For {
};
For(void * mem): mem_(mem) {}
inline slot_index_t recordCount() {
inline slot_index_t recordCount(void) {
return *numdeltas_ptr();
}
@ -136,7 +136,7 @@ class For {
/**
@return the length of the FOR region, in bytes
*/
inline byte_off_t bytes_used() {
inline byte_off_t bytes_used(void) {
return ((intptr_t)(last_delta_ptr()+1)) - (intptr_t)mem_;
}
@ -154,20 +154,20 @@ class For {
static const delta_t DELTA_MAX = (sizeof(delta_t) == 1) ? CHAR_MAX : (sizeof(delta_t) == 2) ? SHRT_MAX : INT_MAX;
static const delta_t DELTA_MIN = (sizeof(delta_t) == 1) ? CHAR_MIN : (sizeof(delta_t) == 2) ? SHRT_MIN : INT_MIN;
inline TYPE offset() { return *base_ptr(); }
inline TYPE offset(void) { return *base_ptr(); }
inline TYPE* base_ptr() { return reinterpret_cast<TYPE*>(mem_); }
inline TYPE* base_ptr(void) { return reinterpret_cast<TYPE*>(mem_); }
inline slot_index_t* numdeltas_ptr() {
inline slot_index_t* numdeltas_ptr(void) {
return reinterpret_cast<slot_index_t*>(base_ptr()+1);
}
inline delta_t * nth_delta_ptr(slot_index_t n) {
return reinterpret_cast<delta_t*>(numdeltas_ptr()+1) + n;
}
inline delta_t * last_delta_ptr() {
inline delta_t * last_delta_ptr(void) {
return nth_delta_ptr(*numdeltas_ptr()-1);
}
inline delta_t * next_delta_ptr() {
inline delta_t * next_delta_ptr(void) {
return nth_delta_ptr(*numdeltas_ptr());
}
void * mem_;

View file

@ -67,7 +67,7 @@ Multicolumn<TUPLE>::Multicolumn(Page * p) :
}
template <class TUPLE>
void Multicolumn<TUPLE>::pack() {
void Multicolumn<TUPLE>::pack(void) {
byte_off_t first_free = 0;
byte_off_t last_free = (intptr_t)(first_header_byte_ptr() - p_->memAddr);
if(unpacked_) {
@ -95,7 +95,7 @@ void Multicolumn<TUPLE>::pack() {
}
template <class TUPLE>
Multicolumn<TUPLE>::~Multicolumn() {
Multicolumn<TUPLE>::~Multicolumn(void) {
for(int i = 0; i < *column_count_ptr(); i++) {
if(unpacked_) delete [] columns_[i];
}
@ -237,7 +237,7 @@ static const page_impl multicolumn_impl = {
// manipulate more than one type of tuple..
template <class TUPLE>
inline plugin_id_t
Multicolumn<TUPLE>::plugin_id() {
Multicolumn<TUPLE>::plugin_id(void) {
return USER_DEFINED_PAGE(0) + 32 + TUPLE::TUPLE_ID;
}
@ -260,7 +260,7 @@ static void multicolumnCleanup(Page *p) {
}
template <class TUPLE>
page_impl Multicolumn<TUPLE>::impl() {
page_impl Multicolumn<TUPLE>::impl(void) {
page_impl ret = multicolumn_impl;
ret.page_type = Multicolumn<TUPLE>::plugin_id();
ret.pageLoaded = multicolumnLoaded<TUPLE>;

View file

@ -120,13 +120,13 @@ template <class TUPLE> class Multicolumn {
explanation of where these pointers are stored
*/
inline column_number_t * column_count_ptr() {
inline column_number_t * column_count_ptr(void) {
return reinterpret_cast<column_number_t*>(p_->memAddr+USABLE_SIZE_OF_PAGE)-1;
}
inline byte_off_t * exceptions_offset_ptr() {
inline byte_off_t * exceptions_offset_ptr(void) {
return reinterpret_cast<byte_off_t*>(column_count_ptr())-1;
}
inline byte_off_t * exceptions_len_ptr() {
inline byte_off_t * exceptions_len_ptr(void) {
return exceptions_offset_ptr()-1;;
}
inline column_header * column_header_ptr(column_number_t column_number) {
@ -153,7 +153,7 @@ template <class TUPLE> class Multicolumn {
inline byte * column_base_ptr(column_number_t column_number) {
return *column_offset_ptr(column_number) + p_->memAddr;
}
inline byte * first_header_byte_ptr() {
inline byte * first_header_byte_ptr(void) {
return reinterpret_cast<byte*>(column_header_ptr((*column_count_ptr())-1));
}

View file

@ -28,7 +28,7 @@ namespace rose {
static const int PLUGIN_ID = 2;
inline void offset(TYPE o) {}
inline size_t max_overrun() { return sizeof(TYPE); }
inline size_t max_overrun(void) { return sizeof(TYPE); }
inline slot_index_t append(int xid, const TYPE dat, byte_off_t * except,
byte * exceptions, int *free_bytes) {
slot_index_t ret = *numentries_ptr();
@ -80,18 +80,18 @@ namespace rose {
Nop(void * mem): mem_(mem) { }
Nop() : mem_(0) {}
inline slot_index_t recordCount() {
inline slot_index_t recordCount(void) {
return *numentries_ptr();
}
inline byte_off_t bytes_used() {return sizeof(slot_index_t) + ( *numentries_ptr() * sizeof(TYPE) ); }
inline byte_off_t bytes_used(void) {return sizeof(slot_index_t) + ( *numentries_ptr() * sizeof(TYPE) ); }
inline void mem(byte * mem) { mem_=mem; }
inline void init_mem(byte* mem) {
mem_=mem;
*numentries_ptr() = 0;
}
private:
inline slot_index_t* numentries_ptr() {
inline slot_index_t* numentries_ptr(void) {
return reinterpret_cast<slot_index_t*>(mem_);
}
void * mem_;

View file

@ -9,7 +9,7 @@ namespace rose {
class SingleColumnTypePageLayout {
public:
typedef FORMAT FMT;
static inline void initPageLayout() {
static inline void initPageLayout(void) {
stasis_page_impl_register(FMT::impl());
// XXX these should register template instantiations of worker
@ -41,10 +41,10 @@ namespace rose {
free(plugins);
return f;
}
static inline int cmp_id() {
static inline int cmp_id(void) {
return my_cmp_num;
}
static inline int init_id() {
static inline int init_id(void) {
return my_init_num;
}
private:
@ -65,7 +65,7 @@ namespace rose {
class StaticMultiColumnTypePageLayout {
public:
typedef FORMAT FMT;
static inline void initPageLayout() {
static inline void initPageLayout(void) {
stasis_page_impl_register(FMT::impl());
// XXX these should register template instantiations of worker
@ -106,10 +106,10 @@ namespace rose {
return f;
}
static inline int cmp_id() {
static inline int cmp_id(void) {
return my_cmp_num;
}
static inline int init_id() {
static inline int init_id(void) {
return my_init_num;
}
private:
@ -150,10 +150,10 @@ namespace rose {
}
return f;
}
static inline int cmp_id() {
static inline int cmp_id(void) {
return my_cmp_num;
}
static inline int init_id() {
static inline int init_id(void) {
return my_init_num;
}
private:

View file

@ -188,7 +188,7 @@ class PluginDispatcher{
dispatchSwitch(c,caseSetPlugin,mem);
}
~PluginDispatcher() {
~PluginDispatcher(void) {
for(column_number_t i = 0; i < column_count_; i++) {
dispatchSwitch(i,caseDelPlugin,0);
}

View file

@ -97,7 +97,7 @@ static const page_impl pstar_impl = {
*/
template<class COMPRESSOR, class TYPE>
page_impl
Pstar<COMPRESSOR, TYPE>::impl() {
Pstar<COMPRESSOR, TYPE>::impl(void) {
page_impl ret = pstar_impl;
ret.page_type = plugin_id<Pstar<COMPRESSOR,TYPE>,COMPRESSOR,TYPE>();
ret.pageLoaded = pStarLoaded<COMPRESSOR, TYPE>;

View file

@ -28,7 +28,7 @@ template <class COMPRESSOR, class TYPE> class Pstar {
free_bytes_ = *freespace_ptr() - plug_.bytes_used() - plug_.max_overrun();
p->impl = this;
}
inline void pack() { };
inline void pack(void) { };
/**
Append a new value to a page managed by pstar.
@ -82,7 +82,7 @@ template <class COMPRESSOR, class TYPE> class Pstar {
} */
return ret;
}
inline COMPRESSOR * compressor() { return &plug_; }
inline COMPRESSOR * compressor(void) { return &plug_; }
static page_impl impl();
@ -95,10 +95,10 @@ template <class COMPRESSOR, class TYPE> class Pstar {
free_bytes_ = *freespace_ptr() - plug_.bytes_used() - plug_.max_overrun();
}
inline byte_off_t * freespace_ptr() {
inline byte_off_t * freespace_ptr(void) {
return reinterpret_cast<byte_off_t*>(p_->memAddr+USABLE_SIZE_OF_PAGE)-1;
}
inline record_size_t * recordsize_ptr() {
inline record_size_t * recordsize_ptr(void) {
return reinterpret_cast<record_size_t*>(freespace_ptr())-1;
}

View file

@ -32,7 +32,7 @@ class Rle {
static const int PLUGIN_ID = 1;
inline void offset(TYPE off) { nth_block_ptr(0)->data = off; };
inline size_t max_overrun() { return sizeof(triple_t); }
inline size_t max_overrun(void) { return sizeof(triple_t); }
/** @see For::append */
inline slot_index_t append(int xid, const TYPE dat,
@ -46,7 +46,7 @@ class Rle {
recordFind(int xid, slot_index_t start, slot_index_t stop,
byte *exceptions, TYPE value,
std::pair<slot_index_t,slot_index_t>& scratch);
void init_getspecific() {
void init_getspecific(void) {
// int ret =pthread_key_create(&last_key_, 0);
// assert(!ret);
}
@ -67,7 +67,7 @@ class Rle {
init_getspecific();
// pthread_mutex_init(&last_mut_,0);
}
inline slot_index_t recordCount() {
inline slot_index_t recordCount(void) {
triple_t *n = last_block_ptr();
return (n->index) + (n->copies);
}
@ -83,13 +83,13 @@ class Rle {
init_getspecific();
}
~Rle() {
~Rle(void) {
// pthread_key_delete(last_key_);
}
/**
@see For::bytes_used();
*/
inline byte_off_t bytes_used() {
inline byte_off_t bytes_used(void) {
return ((intptr_t)(last_block_ptr()+1))-(intptr_t)mem_;
}
@ -112,8 +112,8 @@ class Rle {
// assert(!ret);
}
private:
inline TYPE offset() { return nth_block_ptr(0)->dat; }
inline block_index_t* block_count_ptr() {
inline TYPE offset(void) { return nth_block_ptr(0)->dat; }
inline block_index_t* block_count_ptr(void) {
return reinterpret_cast<block_index_t*>(mem_);
}
inline triple_t* nth_block_ptr(block_index_t n) {
@ -136,10 +136,10 @@ class Rle {
// return &((reinterpret_cast<triple_t*>(block_count_ptr()+1) + n)->data);
return &(nth_block_ptr(n)->data);
}
inline triple_t* last_block_ptr() {
inline triple_t* last_block_ptr(void) {
return nth_block_ptr(*block_count_ptr()-1);
}
inline triple_t* new_block_ptr() {
inline triple_t* new_block_ptr(void) {
return nth_block_ptr(*block_count_ptr());
}
void * mem_;

View file

@ -154,7 +154,7 @@ class StaticMulticolumn {
p->impl = this;
}
~StaticMulticolumn() {
~StaticMulticolumn(void) {
#define STATIC_MC_DEINIT(i,plug) \
if(i < N) { \
@ -440,7 +440,7 @@ class StaticMulticolumn {
}
}
inline void pack() {
inline void pack(void) {
assertlocked(p_->rwlatch);
#ifdef PACK_STATS
if(pack_first) {
@ -573,13 +573,13 @@ class StaticMulticolumn {
explanation of where these pointers are stored
*/
inline column_number_t * column_count_ptr() {
inline column_number_t * column_count_ptr(void) {
return reinterpret_cast<column_number_t*>(p_->memAddr+USABLE_SIZE_OF_PAGE)-1;
}
inline byte_off_t * exceptions_offset_ptr() {
inline byte_off_t * exceptions_offset_ptr(void) {
return reinterpret_cast<byte_off_t*>(column_count_ptr())-1;
}
inline byte_off_t * exceptions_len_ptr() {
inline byte_off_t * exceptions_len_ptr(void) {
return exceptions_offset_ptr()-1;;
}
inline column_header * column_header_ptr(column_number_t column_number) {
@ -606,11 +606,11 @@ class StaticMulticolumn {
inline byte * column_base_ptr(column_number_t column_number) {
return *column_offset_ptr(column_number) + p_->memAddr;
}
inline byte * first_header_byte_ptr() {
inline byte * first_header_byte_ptr(void) {
return reinterpret_cast<byte*>(column_header_ptr((*column_count_ptr())-1));
}
static inline plugin_id_t plugin_id() {
static inline plugin_id_t plugin_id(void) {
// XXX collides with multicolumn.h
return USER_DEFINED_PAGE(0) + 32 + TUPLE::TUPLE_ID;
}
@ -696,7 +696,7 @@ template <int N, class TUPLE,
class COMP5, class COMP6, class COMP7, class COMP8, class COMP9,
class COMP10, class COMP11, class COMP12, class COMP13, class COMP14,
class COMP15, class COMP16, class COMP17, class COMP18, class COMP19>
page_impl StaticMulticolumn<N,TUPLE,COMP0,COMP1,COMP2,COMP3,COMP4,COMP5,COMP6,COMP7,COMP8,COMP9,COMP10,COMP11,COMP12,COMP13,COMP14,COMP15,COMP16,COMP17,COMP18,COMP19>::impl() {
page_impl StaticMulticolumn<N,TUPLE,COMP0,COMP1,COMP2,COMP3,COMP4,COMP5,COMP6,COMP7,COMP8,COMP9,COMP10,COMP11,COMP12,COMP13,COMP14,COMP15,COMP16,COMP17,COMP18,COMP19>::impl(void) {
page_impl ret = static_multicolumn_impl;
ret.page_type = StaticMulticolumn<N,TUPLE,COMP0,COMP1,COMP2,COMP3,COMP4,COMP5,COMP6,COMP7,COMP8,COMP9,COMP10,COMP11,COMP12,COMP13,COMP14,COMP15,COMP16,COMP17,COMP18,COMP19>::plugin_id();
ret.pageLoaded = staticMulticolumnLoaded<N,TUPLE,COMP0,COMP1,COMP2,COMP3,COMP4,COMP5,COMP6,COMP7,COMP8,COMP9,COMP10,COMP11,COMP12,COMP13,COMP14,COMP15,COMP16,COMP17,COMP18,COMP19>;

View file

@ -44,7 +44,7 @@ namespace rose {
return s.flag_ == TOMBSTONE;
}
explicit inline StaticTuple() {
explicit inline StaticTuple(void) {
s.flag_ = NORMAL; s.epoch_ = 0 ;
initializePointers();
}
@ -74,9 +74,9 @@ namespace rose {
initializePointers();
}
inline ~StaticTuple() { }
inline ~StaticTuple(void) { }
static inline byte_off_t sizeofBytes() {
static inline byte_off_t sizeofBytes(void) {
// Computing by starting from zero, and adding up column costs wouldn't
// take struct padding into account. This might over-estimate the
// size, but that's fine, since any in-memory copy will either be malloced
@ -491,7 +491,7 @@ namespace rose {
scratch_() {}
inline explicit iterator(const iterator &i) : c_(i.c_), dat_(i.dat_),
off_(i.off_), scratch_() {}
inline StaticTuple& operator*() {
inline StaticTuple& operator*(void) {
if(0 < N) scratch_.set0((TYPE0*)dat_[0][off_]);
if(1 < N) scratch_.set1((TYPE1*)dat_[1][off_]);
if(2 < N) scratch_.set2((TYPE2*)dat_[2][off_]);
@ -521,8 +521,8 @@ namespace rose {
inline bool operator!=(const iterator &a) const {
return(off_!=a.off);
}
inline void operator++() { off_++; }
inline void operator--() { off_--; }
inline void operator++(void) { off_++; }
inline void operator--(void) { off_--; }
inline void operator+=(int i) { abort(); }
inline int operator-(iterator &i) {
return off_ - i.off_;
@ -572,7 +572,7 @@ namespace rose {
st s;
inline void initializePointers() {
inline void initializePointers(void) {
if(first_) {
st str;
if(0 < N) cols_[0] = (byte*)&str.cols0_ - (byte*)&str;

View file

@ -49,8 +49,8 @@ class Tuple {
cols_[c] = t->cols_[c];
}
} */
inline ~Tuple() { delete[] cols_; delete[] byteArray_; }
inline bool tombstone() {
inline ~Tuple(void) { delete[] cols_; delete[] byteArray_; }
inline bool tombstone(void) {
return false;
}
inline TYPE * set(column_number_t col,void* val) {
@ -79,19 +79,19 @@ class Tuple {
cols_[i] = newCols[i];
}
} */
inline byte* toByteArray() {
inline byte* toByteArray(void) {
byte* ret = byteArray_;
memcpy(ret, &count_, sizeof(count_));
memcpy(ret+sizeof(count_), cols_, count_ * sizeof(TYPE));
return ret;
}
/* inline operator const byte * () {
/* inline operator const byte * (void) {
return toByteArray();
} */
inline operator TYPE () {
inline operator TYPE (void) {
return cols_[0]; //*get(0);
}
/* inline operator TYPE () {
/* inline operator TYPE (void) {
assert(count_ == 0);
return cols_[0];
} */
@ -132,7 +132,7 @@ class Tuple {
inline explicit iterator(const iterator &i) : c_(i.c_), dat_(i.dat_), off_(i.off_),
scratch_(c_) {}
inline Tuple<TYPE>& operator*() {
inline Tuple<TYPE>& operator*(void) {
for(column_number_t i = 0; i < c_; i++) {
scratch_.set(i,(void*)&dat_[i][off_]);
}
@ -146,8 +146,8 @@ class Tuple {
//assert(dat_==a.dat_ && c_==a.c_);
return (off_!=a.off_);
}
inline void operator++() { off_++; }
inline void operator--() { off_--; }
inline void operator++(void) { off_++; }
inline void operator--(void) { off_--; }
inline void operator+=(int i) { abort(); }
inline int operator-(iterator&i) {
return off_ - i.off_;
@ -168,7 +168,7 @@ class Tuple {
};
static const uint32_t TIMESTAMP = 0;
private:
Tuple() { abort(); }
Tuple(void) { abort(); }
explicit Tuple(const Tuple& t) { abort(); }
column_number_t count_;
TYPE * const cols_;

View file

@ -96,18 +96,18 @@ class gcIterator {
beginning_of_time_(t.beginning_of_time_),
ts_col_(t.ts_col_) { }
~gcIterator() {
~gcIterator(void) {
if (freeIt) {
delete i_;
}
}
ROW & operator*() {
ROW & operator*(void) {
// Both should pass, comment out for perf
//assert(!went_back_);
//assert(have_current_);
return current_;
}
bool get_next() {
bool get_next(void) {
// assert(!went_back_);
// assert(!at_end_);
while(!have_newest_) {
@ -147,7 +147,7 @@ class gcIterator {
// return (*i_) != (*a.i_);
return !(*this == a);
}
inline void operator++() {
inline void operator++(void) {
if(went_back_) {
went_back_ = false;
} else {
@ -165,11 +165,11 @@ class gcIterator {
}
}
}
inline void operator--() {
inline void operator--(void) {
// assert(!went_back_);
went_back_ = true;
}
/* inline gcIterator* end() {
/* inline gcIterator* end(void) {
return new gcIterator(i_->end());
} */
private:
@ -202,7 +202,7 @@ class gcIterator {
return 1;
}
//explicit gcIterator() { abort(); }
//explicit gcIterator(void) { abort(); }
void operator=(gcIterator & t) { abort(); }
int operator-(gcIterator & t) { abort(); }
ITER * i_;
@ -230,7 +230,7 @@ class gcIterator {
template <class ROW, class PAGELAYOUT>
class treeIterator {
private:
inline void init_helper() {
inline void init_helper(void) {
if(!lsmIterator_) {
currentPage_ = 0;
pageid_ = -1;
@ -323,7 +323,7 @@ class treeIterator {
currentPage_((PAGELAYOUT*)((p_)?p_->impl:0)) {
if(p_) { readlock(p_->rwlatch,0); }
}
~treeIterator() {
~treeIterator(void) {
if(lsmIterator_) {
lsmTreeIterator_close(-1, lsmIterator_);
}
@ -333,7 +333,7 @@ class treeIterator {
p_ = 0;
}
}
ROW & operator*() {
ROW & operator*(void) {
assert(this->lsmIterator_);
ROW* readTuple = currentPage_->recordRead(-1,slot_, &scratch_);
@ -371,16 +371,16 @@ class treeIterator {
inline bool operator!=(const treeIterator &a) const {
return !(*this==a);
}
inline void operator++() {
inline void operator++(void) {
slot_++;
}
inline void operator--() {
inline void operator--(void) {
// This iterator consumes its input, and only partially supports
// "==". "--" is just for book keeping, so we don't need to worry
// about setting the other state.
slot_--;
}
inline treeIterator* end() {
inline treeIterator* end(void) {
treeIterator* t = new treeIterator(tree_,scratch_,keylen_);
if(!lsmIterator_) {
t->slot_ = 0;
@ -410,7 +410,7 @@ class treeIterator {
return t;
}
private:
explicit treeIterator() { abort(); }
explicit treeIterator(void) { abort(); }
void operator=(treeIterator & t) { abort(); }
int operator-(treeIterator & t) { abort(); }
recordid tree_;
@ -481,7 +481,7 @@ class mergeIterator {
before_eof_(i.before_eof_)
{ }
const ROW& operator* () {
const ROW& operator* (void) {
if(curr_ == A) { return *a_; }
if(curr_ == B || curr_ == BOTH) { return *b_; }
abort();
@ -490,7 +490,7 @@ class mergeIterator {
if(curr_ == B || curr_ == BOTH) { return *b_; }
abort();
}
void seekEnd() {
void seekEnd(void) {
curr_ = NONE;
}
// XXX Only works if exactly one of the comparators is derived from end.
@ -505,7 +505,7 @@ class mergeIterator {
inline bool operator!=(const mergeIterator &o) const {
return !(*this == o);
}
inline void operator++() {
inline void operator++(void) {
off_++;
if(curr_ == BOTH) {
++a_;
@ -516,7 +516,7 @@ class mergeIterator {
}
curr_ = calcCurr(curr_);
}
inline void operator--() {
inline void operator--(void) {
off_--;
if(curr_ == BOTH) {
--a_;
@ -543,7 +543,7 @@ class mergeIterator {
curr_ = i.curr_;
before_eof_ = i.before_eof_;
}
inline unsigned int offset() { return off_; }
inline unsigned int offset(void) { return off_; }
private:
unsigned int off_;
ITERA a_;
@ -580,10 +580,10 @@ class versioningIterator {
off_(i.off_)
{}
const ROW& operator* () {
const ROW& operator* (void) {
return *a_;
}
void seekEnd() {
void seekEnd(void) {
a_.seekEnd();// = aend_; // XXX good idea?
}
inline bool operator==(const versioningIterator &o) const {
@ -592,7 +592,7 @@ class versioningIterator {
inline bool operator!=(const versioningIterator &o) const {
return !(*this == o);
}
inline void operator++() {
inline void operator++(void) {
if(check_tombstone_) {
do {
++a_;
@ -608,7 +608,7 @@ class versioningIterator {
}
off_++;
}
inline void operator--() {
inline void operator--(void) {
--a_;
// need to remember that we backed up so that ++ can work...
// the cursor is always positioned on a live value, and -- can
@ -627,7 +627,7 @@ class versioningIterator {
// scratch_ = *a_;
off_ = i.off_;
}
inline unsigned int offset() { return off_; }
inline unsigned int offset(void) { return off_; }
private:
ITER a_;
ITER aend_;
@ -652,22 +652,22 @@ class versioningIterator {
stlSetIterator( SET * s ) : it_(s->begin()), itend_(s->end()) {}
stlSetIterator( STLITER& it, STLITER& itend ) : it_(it), itend_(itend) {}
explicit stlSetIterator(stlSetIterator &i) : it_(i.it_), itend_(i.itend_){}
const ROW& operator* () { return *it_; }
const ROW& operator* (void) { return *it_; }
void seekEnd() {
void seekEnd(void) {
it_ = itend_; // XXX good idea?
}
stlSetIterator * end() { return new stlSetIterator(itend_,itend_); }
stlSetIterator * end(void) { return new stlSetIterator(itend_,itend_); }
inline bool operator==(const stlSetIterator &o) const {
return it_ == o.it_;
}
inline bool operator!=(const stlSetIterator &o) const {
return !(*this == o);
}
inline void operator++() {
inline void operator++(void) {
++it_;
}
inline void operator--() {
inline void operator--(void) {
--it_;
}
inline int operator-(stlSetIterator&i) {

View file

@ -24,7 +24,7 @@ public:
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
stlslab ( ) throw() {
stlslab ( void ) throw() {
alloc = stasis_util_slab_create(sizeof(T), 65536);
}
stlslab ( const stlslab& s) throw() {
@ -42,7 +42,7 @@ public:
//assert(alloc);
stasis_util_slab_ref(alloc);
}
~stlslab () {
~stlslab (void) {
stasis_util_slab_destroy(alloc);
}
pointer address ( reference x ) const { return &x; }
@ -60,7 +60,7 @@ public:
assert(n == 1);
stasis_util_slab_free(alloc, p);
}
size_type max_size() const throw() { return 1; }
size_type max_size(void) const throw() { return 1; }
void construct ( pointer p, const_reference val ) { new ((void*)p) T (val); }
void destroy (pointer p) {((T*)p)->~T(); }
stasis_util_slab_t * alloc;

View file

@ -13,7 +13,7 @@
#include "log2.h"
static inline unsigned long long stasis_get_tsc() {
static inline unsigned long long stasis_get_tsc(void) {
unsigned long long tsc;
asm volatile ("rdtsc" : "=A" (tsc));
return tsc;

View file

@ -15,7 +15,7 @@
#define CK_NORMAL 0
#define START_TEST(x) static void x() {
#define START_TEST(x) static void x(void) {
#define END_TEST }
static int reaper_enabled = 0;

View file

@ -42,7 +42,7 @@ terms specified in this license.
/** A simple test utility to make sure that check is installed and working.
*/
int main() {
int main(void) {
int nf;
Suite *s = check_suite();
SRunner *sr = srunner_create(s);

View file

@ -52,8 +52,7 @@ terms specified in this license.
#define TESTS 500
int test()
{
int test(void) {
struct timeval start, end, total;
recordid rids[TESTS];
long commited[TESTS];

View file

@ -47,7 +47,7 @@ terms specified in this license.
#include "test.h"
int test() {
int test(void) {
int xid_0;
int writeVal_0;
int readVal_0;

View file

@ -52,8 +52,7 @@ terms specified in this license.
#define TESTS 500
int test()
{
int test(void) {
struct timeval start, end, total;
recordid rids[TESTS];
long commited[TESTS];

View file

@ -202,7 +202,7 @@ void env_open(DB_ENV **dbenvp) {
}
void env_dir_create() {
void env_dir_create(void) {
struct stat sb;

View file

@ -193,7 +193,7 @@ void env_open(DB_ENV **dbenvp) {
}
void env_dir_create() {
void env_dir_create(void) {
struct stat sb;

View file

@ -228,7 +228,7 @@ void env_open(DB_ENV **dbenvp) {
}
void env_dir_create() {
void env_dir_create(void) {
struct stat sb;

View file

@ -202,7 +202,7 @@ void env_open(DB_ENV **dbenvp) {
}
void env_dir_create() {
void env_dir_create(void) {
struct stat sb;

View file

@ -204,7 +204,7 @@ void env_open(DB_ENV **dbenvp) {
}
void env_dir_create() {
void env_dir_create(void) {
struct stat sb;

View file

@ -62,7 +62,7 @@ void env_open(DB_ENV **);
int main() {
int main(void) {
DB *dbp;
DB_ENV *dbenv;
DB_TXN *xid;
@ -120,8 +120,7 @@ err: if ((t_ret = dbp->close(dbp, 0)) != 0 && ret == 0)
}
void
env_dir_create()
{
env_dir_create(void) {
struct stat sb;

View file

@ -52,7 +52,7 @@ terms specified in this license.
int main() {
int main(void) {
DB *dbp;
DBT key1, dat1, key2, dat2, key3, dat3, key4, dat4;
int ret, i, t_ret;

View file

@ -47,7 +47,7 @@ terms specified in this license.
#include "test.h"
int test() {
int test(void) {
int i;
int xid, writeVal, readVal;
recordid rec;

View file

@ -47,7 +47,7 @@ terms specified in this license.
#include "test.h"
int test() {
int test(void) {
int xid_0;
int writeVal_0;
int readVal_0;

View file

@ -53,7 +53,7 @@ typedef struct {
char *value;
} test_pair_t;
int test() {
int test(void) {
unsigned int i, xid;
const unsigned int INSERT_NUM = 10000; /* should be > JB_HASHTABLE_SIZE */

View file

@ -53,7 +53,7 @@ typedef struct {
* Test of jb persistant hash with many entries
*/
int test() {
int test(void) {
unsigned int i, xid;
const unsigned int INSERT_NUM = 10000; /* should be > JB_HASHTABLE_SIZE */

View file

@ -55,7 +55,7 @@ typedef struct {
* Test of persistant hash with many entries
*/
int test() {
int test(void) {
struct timeval start, end, total;
unsigned int i, xid;

View file

@ -53,7 +53,7 @@ typedef struct {
* Simple test of persistant hash table
*/
int test() {
int test(void) {
test_pair_t one = { 1, "one" };
test_pair_t two = { 2, "two" };

View file

@ -47,7 +47,7 @@ terms specified in this license.
#include "test.h"
int test() {
int test(void) {
int xid_0;
int writeVal_0;
int readVal_0;

View file

@ -47,7 +47,7 @@ terms specified in this license.
#include "test.h"
int test() {
int test(void) {
int xid, writeVal, readVal, i;
recordid rec;

View file

@ -47,7 +47,7 @@ terms specified in this license.
#include "test.h"
int test() {
int test(void) {
int writeVal, i;
int *wptr= (int *)malloc(sizeof(int));

View file

@ -47,7 +47,7 @@ terms specified in this license.
#include "test.h"
int test() {
int test(void) {
int i;
int xid, writeVal, readVal;
recordid rec;

View file

@ -47,7 +47,7 @@ terms specified in this license.
#include "test.h"
int test() {
int test(void) {
int i;
int writeVal, readVal;

View file

@ -47,7 +47,7 @@ terms specified in this license.
#include "test.h"
int test() {
int test(void) {
int i;
int writeVal, readVal;

Some files were not shown because too many files have changed in this diff Show more