moved in-memory data structures and hash functions to util/
This commit is contained in:
parent
87d4563ab5
commit
a89c09d87c
52 changed files with 70 additions and 57 deletions
|
@ -4,7 +4,7 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include <stasis/lhtable.h>
|
||||
#include <stasis/util/lhtable.h>
|
||||
#include <assert.h>
|
||||
|
||||
int entries;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Created on: Oct 19, 2009
|
||||
* Author: sears
|
||||
*/
|
||||
#include <stasis/concurrentHash.h>
|
||||
#include <stasis/util/concurrentHash.h>
|
||||
#include <stasis/transactional.h>
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <stasis/rw.h>
|
||||
#include <stasis/util/rw.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Created on: Oct 12, 2009
|
||||
* Author: sears
|
||||
*/
|
||||
#include <stasis/rw.h>
|
||||
#include <stasis/util/rw.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Created on: Oct 12, 2009
|
||||
* Author: sears
|
||||
*/
|
||||
#include <stasis/rw.h>
|
||||
#include <stasis/util/rw.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Created on: Oct 12, 2009
|
||||
* Author: sears
|
||||
*/
|
||||
#include <stasis/rw.h>
|
||||
#include <stasis/util/rw.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <config.h>
|
||||
#include <stasis/common.h>
|
||||
#include <stasis/redblack.h>
|
||||
#include <stasis/util/redblack.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -1,6 +1,22 @@
|
|||
ADD_LIBRARY(stasis crc32.c redblack.c lhtable.c concurrentHash.c rw.c doubleLinkedList.c
|
||||
ADD_LIBRARY(stasis util/crc32.c
|
||||
util/redblack.c
|
||||
util/lhtable.c
|
||||
util/concurrentHash.c
|
||||
util/rw.c
|
||||
util/doubleLinkedList.c
|
||||
util/linkedlist.c
|
||||
util/hash.c
|
||||
util/log2.c
|
||||
util/histogram.c
|
||||
util/hashFunctions.c
|
||||
util/min.c
|
||||
util/ringbuffer.c
|
||||
util/multiset.c
|
||||
util/slab.c
|
||||
util/stlredblack.cpp
|
||||
util/stlslab.cpp
|
||||
common.c flags.c stats.c bufferManager.c
|
||||
linkedlist.c operations.c pageHandle.c
|
||||
operations.c pageHandle.c
|
||||
bufferManager/concurrentBufferManager.c
|
||||
bufferManager/legacy/pageFile.c
|
||||
bufferManager/legacy/pageCache.c
|
||||
|
@ -31,7 +47,6 @@ ADD_LIBRARY(stasis crc32.c redblack.c lhtable.c concurrentHash.c rw.c doubleLink
|
|||
operations/arrayList.c
|
||||
operations/lsnFreeSet.c
|
||||
operations/segmentFile.c
|
||||
hash.c
|
||||
operations/naiveLinearHash.c
|
||||
operations/linearHashNTA.c
|
||||
operations/linkedListNTA.c
|
||||
|
@ -43,9 +58,7 @@ ADD_LIBRARY(stasis crc32.c redblack.c lhtable.c concurrentHash.c rw.c doubleLink
|
|||
bufferManager/pageArray.c
|
||||
bufferManager/bufferHash.c replacementPolicy/lru.c
|
||||
replacementPolicy/lruFast.c replacementPolicy/threadsafeWrapper.c replacementPolicy/concurrentWrapper.c
|
||||
util/log2.c util/histogram.c util/hashFunctions.c util/min.c util/ringbuffer.c
|
||||
util/multiset.c util/slab.c
|
||||
stlredblack.cpp util/stlslab.cpp)
|
||||
)
|
||||
ADD_LIBRARY(stasis_experimental
|
||||
experimental/consumer.c
|
||||
experimental/fifo.c
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
|
||||
#include <stasis/common.h>
|
||||
#include <stasis/allocationPolicy.h>
|
||||
#include <stasis/lhtable.h>
|
||||
#include <stasis/redblack.h>
|
||||
#include <stasis/util/lhtable.h>
|
||||
#include <stasis/util/redblack.h>
|
||||
#include <stasis/transactional.h>
|
||||
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#define LH_HASH(val,len,x,y) bh_hash(val,len,x,y)
|
||||
#undef PBL_COMPAT
|
||||
#define PBL_COMPAT 0
|
||||
#include <stasis/hash.h>
|
||||
#include "../lhtable.c"
|
||||
#include <stasis/util/hash.h>
|
||||
#include "../util/lhtable.c"
|
||||
// End multiple include trick.
|
||||
|
||||
#include <stasis/bufferManager/bufferHash.h>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Created on: Oct 19, 2009
|
||||
* Author: sears
|
||||
*/
|
||||
#include <stasis/concurrentHash.h>
|
||||
#include <stasis/util/concurrentHash.h>
|
||||
#include <stasis/replacementPolicy.h>
|
||||
#include <stasis/bufferPool.h>
|
||||
#include <stasis/pageHandle.h>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <stasis/page.h>
|
||||
|
||||
#include <stasis/lhtable.h>
|
||||
#include <stasis/util/lhtable.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
#include <stasis/common.h>
|
||||
#include <stasis/redblack.h>
|
||||
#include <stasis/util/redblack.h>
|
||||
#include <stasis/util/multiset.h>
|
||||
#include <stasis/flags.h>
|
||||
#include <stasis/dirtyPageTable.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <stasis/experimental/fifo.h>
|
||||
#include <stasis/crc32.h>
|
||||
#include <stasis/util/crc32.h>
|
||||
#include <stasis/experimental/logMemory.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <stasis/bufferManager.h>
|
||||
#include <stasis/experimental/graph.h>
|
||||
#include <stasis/page.h>
|
||||
#include <stasis/crc32.h>
|
||||
#include <stasis/util/crc32.h>
|
||||
#include <assert.h>
|
||||
|
||||
int numOut = 0;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Author: sears
|
||||
*/
|
||||
#include<stasis/transactional.h>
|
||||
#include<stasis/lhtable.h>
|
||||
#include<stasis/util/lhtable.h>
|
||||
#include<stasis/experimental/group.h>
|
||||
#include<string.h>
|
||||
typedef struct {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <pbl/pbl.h>
|
||||
#include <stasis/lockManager.h>
|
||||
#include <stasis/latches.h>
|
||||
#include <stasis/hash.h>
|
||||
#include <stasis/util/hash.h>
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <stasis/experimental/multiplexer.h>
|
||||
#include <stasis/crc32.h>
|
||||
#include <stasis/util/crc32.h>
|
||||
#include <stasis/operations/linearHashNTA.h>
|
||||
|
||||
#include <stasis/experimental/logMemory.h>
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
#include <stasis/constants.h>
|
||||
#include <stasis/io/handle.h>
|
||||
#include <stasis/linkedlist.h>
|
||||
#include <stasis/redblack.h>
|
||||
#include <stasis/util/linkedlist.h>
|
||||
#include <stasis/util/redblack.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <config.h>
|
||||
#include <stasis/common.h>
|
||||
#undef STLSEARCH // XXX
|
||||
#include <stasis/redblack.h>
|
||||
#include <stasis/util/redblack.h>
|
||||
|
||||
|
||||
#include <stasis/io/rangeTracker.h>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <stasis/flags.h>
|
||||
|
||||
#include <stasis/util/ringbuffer.h>
|
||||
#include <stasis/crc32.h>
|
||||
#include <stasis/util/crc32.h>
|
||||
#include <stasis/latches.h>
|
||||
#include <stasis/logger/filePool.h>
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ terms specified in this license.
|
|||
#include <stasis/page.h> // For stasis_record_type_to_size()
|
||||
#include <stasis/logger/logger2.h> // needed for LoggerSizeOfInternalLogEntry()
|
||||
#include <stasis/logger/logEntry.h>
|
||||
#include <stasis/crc32.h>
|
||||
#include <stasis/util/crc32.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ terms specified in this license.
|
|||
#include <stasis/flags.h>
|
||||
|
||||
#include <stasis/latches.h>
|
||||
#include <stasis/crc32.h>
|
||||
#include <stasis/util/crc32.h>
|
||||
#include <stasis/util/min.h>
|
||||
|
||||
#include <stasis/logger/safeWrites.h>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define _GNU_SOURCE
|
||||
#include <stasis/latches.h>
|
||||
#include <stasis/transactional.h>
|
||||
#include <stasis/hash.h>
|
||||
#include <stasis/util/hash.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
// The next two #includes are for deprecated code.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include <stasis/latches.h>
|
||||
#include <stasis/transactional.h>
|
||||
#include <stasis/hash.h>
|
||||
#include <stasis/util/hash.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <stasis/bufferManager.h>
|
||||
#include <stasis/operations.h>
|
||||
#include <stasis/hash.h>
|
||||
#include <stasis/util/hash.h>
|
||||
#include <stasis/latches.h>
|
||||
#include <stasis/page.h>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
*/
|
||||
#include <stasis/common.h>
|
||||
#include <stasis/lhtable.h>
|
||||
#include <stasis/util/lhtable.h>
|
||||
#include <stasis/recovery.h>
|
||||
|
||||
#include <stasis/transactionTable.h>
|
||||
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include <stasis/logger/logHandle.h>
|
||||
/** @todo Get rid of linkedlist */
|
||||
#include <stasis/linkedlist.h>
|
||||
#include <stasis/util/linkedlist.h>
|
||||
#include <stasis/page.h> // Needed for pageReadLSN.
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#undef STLSEARCH // XXX
|
||||
|
||||
#include <stasis/lhtable.h>
|
||||
#include <stasis/redblack.h>
|
||||
#include <stasis/util/lhtable.h>
|
||||
#include <stasis/util/redblack.h>
|
||||
#include <stasis/replacementPolicy.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
|
|
@ -354,7 +354,7 @@ History:
|
|||
*/
|
||||
#define _XOPEN_SOURCE 600
|
||||
#include <config.h>
|
||||
#include <stasis/concurrentHash.h>
|
||||
#include <stasis/util/concurrentHash.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
// Calculate a CRC 32 checksum.
|
||||
#include <stasis/crc32.h> /*Added 10-6-04 */
|
||||
#include <stasis/util/crc32.h> /*Added 10-6-04 */
|
||||
|
||||
// LAST MODIFIED:[7-28-93]
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#include <stasis/common.h>
|
||||
#include <stasis/doubleLinkedList.h>
|
||||
#include <stasis/util/doubleLinkedList.h>
|
||||
#include <assert.h>
|
||||
|
||||
typedef LL_ENTRY(value_t) value_t;
|
|
@ -1,4 +1,4 @@
|
|||
#include <stasis/hash.h>
|
||||
#include <stasis/util/hash.h>
|
||||
#include <assert.h>
|
||||
//#include <stdio.h>
|
||||
/**
|
|
@ -1,5 +1,5 @@
|
|||
#include <stasis/lhtable.h>
|
||||
#include <stasis/hash.h>
|
||||
#include <stasis/util/lhtable.h>
|
||||
#include <stasis/util/hash.h>
|
||||
#include <pbl/pbl.h>
|
||||
#include <stasis/latches.h>
|
||||
|
|
@ -44,7 +44,7 @@ terms specified in this license.
|
|||
*
|
||||
* simple linked list
|
||||
*****************************/
|
||||
#include <stasis/linkedlist.h>
|
||||
#include <stasis/util/linkedlist.h>
|
||||
#include <stdio.h>
|
||||
void printList(LinkedList **l) {
|
||||
LinkedList * tmp = *l;
|
|
@ -1,6 +1,6 @@
|
|||
#include <stasis/common.h>
|
||||
#include <stasis/util/min.h>
|
||||
#include <stasis/redblack.h>
|
||||
#include <stasis/util/redblack.h>
|
||||
#include <assert.h>
|
||||
|
||||
static int cmp_lsn_t(const void *ap, const void *bp, const void *ign) {
|
||||
|
|
|
@ -26,7 +26,7 @@ static char rcsid[]="$Id$";
|
|||
|
||||
#include <stasis/common.h>
|
||||
#undef STLSEARCH
|
||||
#include <stasis/redblack.h>
|
||||
#include <stasis/util/redblack.h>
|
||||
#include <stdio.h>
|
||||
#define assert(expr)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#include <stasis/rw.h>
|
||||
#include <stasis/util/rw.h>
|
||||
#include <assert.h>
|
||||
|
||||
//#undef pthread_cond_wait
|
|
@ -7,8 +7,8 @@
|
|||
#include <set>
|
||||
#include <stasis/common.h>
|
||||
#undef STLSEARCH
|
||||
#include <stasis/stlredblack.h>
|
||||
#include <stasis/redblack.h>
|
||||
#include <stasis/util/stlredblack.h>
|
||||
#include <stasis/util/redblack.h>
|
||||
#include <stdio.h>
|
||||
#undef end
|
||||
#undef try
|
|
@ -20,7 +20,7 @@ typedef struct {
|
|||
void * lockpoints;
|
||||
} lladd_pthread_mutex_t;
|
||||
|
||||
#include "rw.h"
|
||||
#include "util/rw.h"
|
||||
|
||||
/**
|
||||
Keeps some profiling information along with a read/write lock.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
#include <stasis/crc32.h>
|
||||
#include <stasis/util/crc32.h>
|
||||
#include <stasis/common.h>
|
||||
|
||||
#ifndef __HASH_H
|
|
@ -49,7 +49,7 @@ terms specified in this license.
|
|||
#define _GNU_SOURCE
|
||||
#include "../check_includes.h"
|
||||
|
||||
#include <stasis/concurrentHash.h>
|
||||
#include <stasis/util/concurrentHash.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
|
|
@ -43,7 +43,7 @@ terms specified in this license.
|
|||
#define _GNU_SOURCE
|
||||
#include "../check_includes.h"
|
||||
|
||||
#include <stasis/lhtable.h>
|
||||
#include <stasis/util/lhtable.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
|
|
@ -43,7 +43,7 @@ terms specified in this license.
|
|||
#include "../check_includes.h"
|
||||
|
||||
#include <stasis/transactional.h>
|
||||
#include <stasis/hash.h>
|
||||
#include <stasis/util/hash.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
extern int dbug_choice(int);
|
||||
#endif
|
||||
|
||||
#include <stasis/redblack.h>
|
||||
#include <stasis/stlredblack.h>
|
||||
#include <stasis/util/redblack.h>
|
||||
#include <stasis/util/stlredblack.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
|
Loading…
Reference in a new issue