moved in-memory data structures and hash functions to util/

This commit is contained in:
Sears Russell 2011-06-13 10:19:44 +00:00
parent 87d4563ab5
commit a89c09d87c
52 changed files with 70 additions and 57 deletions

View file

@ -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;

View file

@ -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>

View file

@ -1,4 +1,4 @@
#include <stasis/rw.h>
#include <stasis/util/rw.h>
#include <pthread.h>
#include <stdio.h>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -7,7 +7,7 @@
#include <stasis/page.h>
#include <stasis/lhtable.h>
#include <stasis/util/lhtable.h>
#include <stdio.h>

View file

@ -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>

View file

@ -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>

View file

@ -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;

View file

@ -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 {

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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.

View file

@ -3,7 +3,7 @@
#include <stasis/latches.h>
#include <stasis/transactional.h>
#include <stasis/hash.h>
#include <stasis/util/hash.h>
#include <assert.h>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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]

View file

@ -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;

View file

@ -1,4 +1,4 @@
#include <stasis/hash.h>
#include <stasis/util/hash.h>
#include <assert.h>
//#include <stdio.h>
/**

View file

@ -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>

View file

@ -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;

View file

@ -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) {

View file

@ -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)

View file

@ -1,4 +1,4 @@
#include <stasis/rw.h>
#include <stasis/util/rw.h>
#include <assert.h>
//#undef pthread_cond_wait

View file

@ -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

View file

@ -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.

View file

@ -1,5 +1,5 @@
#include <stasis/crc32.h>
#include <stasis/util/crc32.h>
#include <stasis/common.h>
#ifndef __HASH_H

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>