diff --git a/benchmarks/lhtableThreaded.c b/benchmarks/lhtableThreaded.c index d7548f6..6cce5f6 100644 --- a/benchmarks/lhtableThreaded.c +++ b/benchmarks/lhtableThreaded.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include int entries; diff --git a/benchmarks/multicore/hashtableDifferentPages.c b/benchmarks/multicore/hashtableDifferentPages.c index 8215b97..7d9f560 100644 --- a/benchmarks/multicore/hashtableDifferentPages.c +++ b/benchmarks/multicore/hashtableDifferentPages.c @@ -4,7 +4,7 @@ * Created on: Oct 19, 2009 * Author: sears */ -#include +#include #include #include #include diff --git a/benchmarks/multicore/readLatch.c b/benchmarks/multicore/readLatch.c index 1e2317d..bfc50ca 100644 --- a/benchmarks/multicore/readLatch.c +++ b/benchmarks/multicore/readLatch.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/benchmarks/multicore/readLatches.c b/benchmarks/multicore/readLatches.c index 80f2850..ce5581e 100644 --- a/benchmarks/multicore/readLatches.c +++ b/benchmarks/multicore/readLatches.c @@ -4,7 +4,7 @@ * Created on: Oct 12, 2009 * Author: sears */ -#include +#include #include #include diff --git a/benchmarks/multicore/writeLatch.c b/benchmarks/multicore/writeLatch.c index 3e30546..9bfe24a 100644 --- a/benchmarks/multicore/writeLatch.c +++ b/benchmarks/multicore/writeLatch.c @@ -4,7 +4,7 @@ * Created on: Oct 12, 2009 * Author: sears */ -#include +#include #include #include diff --git a/benchmarks/multicore/writeLatches.c b/benchmarks/multicore/writeLatches.c index 61c3872..d319380 100644 --- a/benchmarks/multicore/writeLatches.c +++ b/benchmarks/multicore/writeLatches.c @@ -4,7 +4,7 @@ * Created on: Oct 12, 2009 * Author: sears */ -#include +#include #include #include diff --git a/benchmarks/redBlackMemoryOverhead.c b/benchmarks/redBlackMemoryOverhead.c index d9d957b..b8f5145 100644 --- a/benchmarks/redBlackMemoryOverhead.c +++ b/benchmarks/redBlackMemoryOverhead.c @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/stasis/CMakeLists.txt b/src/stasis/CMakeLists.txt index 1761ba7..55449e4 100644 --- a/src/stasis/CMakeLists.txt +++ b/src/stasis/CMakeLists.txt @@ -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 diff --git a/src/stasis/allocationPolicy.c b/src/stasis/allocationPolicy.c index fda6ddd..995c444 100644 --- a/src/stasis/allocationPolicy.c +++ b/src/stasis/allocationPolicy.c @@ -29,8 +29,8 @@ #include #include -#include -#include +#include +#include #include diff --git a/src/stasis/bufferManager/bufferHash.c b/src/stasis/bufferManager/bufferHash.c index 711aa10..50f17da 100644 --- a/src/stasis/bufferManager/bufferHash.c +++ b/src/stasis/bufferManager/bufferHash.c @@ -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 -#include "../lhtable.c" +#include +#include "../util/lhtable.c" // End multiple include trick. #include diff --git a/src/stasis/bufferManager/concurrentBufferManager.c b/src/stasis/bufferManager/concurrentBufferManager.c index c550dc5..7cf167c 100644 --- a/src/stasis/bufferManager/concurrentBufferManager.c +++ b/src/stasis/bufferManager/concurrentBufferManager.c @@ -4,7 +4,7 @@ * Created on: Oct 19, 2009 * Author: sears */ -#include +#include #include #include #include diff --git a/src/stasis/bufferManager/legacy/legacyBufferManager.c b/src/stasis/bufferManager/legacy/legacyBufferManager.c index 2c1d64f..1a92269 100644 --- a/src/stasis/bufferManager/legacy/legacyBufferManager.c +++ b/src/stasis/bufferManager/legacy/legacyBufferManager.c @@ -7,7 +7,7 @@ #include -#include +#include #include diff --git a/src/stasis/dirtyPageTable.c b/src/stasis/dirtyPageTable.c index 99cab71..b84990e 100644 --- a/src/stasis/dirtyPageTable.c +++ b/src/stasis/dirtyPageTable.c @@ -6,7 +6,7 @@ */ #include -#include +#include #include #include #include diff --git a/src/stasis/experimental/fifo.c b/src/stasis/experimental/fifo.c index e10b064..0d1e8ed 100644 --- a/src/stasis/experimental/fifo.c +++ b/src/stasis/experimental/fifo.c @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/src/stasis/experimental/graph.c b/src/stasis/experimental/graph.c index 6fd9aaf..6391c75 100644 --- a/src/stasis/experimental/graph.c +++ b/src/stasis/experimental/graph.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include int numOut = 0; diff --git a/src/stasis/experimental/group.c b/src/stasis/experimental/group.c index 81e8a28..07e5d75 100644 --- a/src/stasis/experimental/group.c +++ b/src/stasis/experimental/group.c @@ -5,7 +5,7 @@ * Author: sears */ #include -#include +#include #include #include typedef struct { diff --git a/src/stasis/experimental/lockManagerImpl.c b/src/stasis/experimental/lockManagerImpl.c index c24349d..1579936 100644 --- a/src/stasis/experimental/lockManagerImpl.c +++ b/src/stasis/experimental/lockManagerImpl.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/stasis/experimental/multiplexer.c b/src/stasis/experimental/multiplexer.c index 3b523fe..e6740d1 100644 --- a/src/stasis/experimental/multiplexer.c +++ b/src/stasis/experimental/multiplexer.c @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/src/stasis/io/non_blocking.c b/src/stasis/io/non_blocking.c index 352100b..1151d33 100644 --- a/src/stasis/io/non_blocking.c +++ b/src/stasis/io/non_blocking.c @@ -3,8 +3,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/src/stasis/io/rangeTracker.c b/src/stasis/io/rangeTracker.c index dc64068..fa39b1e 100644 --- a/src/stasis/io/rangeTracker.c +++ b/src/stasis/io/rangeTracker.c @@ -1,7 +1,7 @@ #include #include #undef STLSEARCH // XXX -#include +#include #include diff --git a/src/stasis/logger/filePool.c b/src/stasis/logger/filePool.c index 9b2cf18..3ab643e 100644 --- a/src/stasis/logger/filePool.c +++ b/src/stasis/logger/filePool.c @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include diff --git a/src/stasis/logger/logEntry.c b/src/stasis/logger/logEntry.c index 2445fa2..0d4dfe3 100644 --- a/src/stasis/logger/logEntry.c +++ b/src/stasis/logger/logEntry.c @@ -42,7 +42,7 @@ terms specified in this license. #include // For stasis_record_type_to_size() #include // needed for LoggerSizeOfInternalLogEntry() #include -#include +#include #include diff --git a/src/stasis/logger/safeWrites.c b/src/stasis/logger/safeWrites.c index 5205393..a7ff567 100644 --- a/src/stasis/logger/safeWrites.c +++ b/src/stasis/logger/safeWrites.c @@ -46,7 +46,7 @@ terms specified in this license. #include #include -#include +#include #include #include diff --git a/src/stasis/operations/linearHashNTA.c b/src/stasis/operations/linearHashNTA.c index 306856e..45d6b5a 100644 --- a/src/stasis/operations/linearHashNTA.c +++ b/src/stasis/operations/linearHashNTA.c @@ -2,7 +2,7 @@ #define _GNU_SOURCE #include #include -#include +#include #include #include // The next two #includes are for deprecated code. diff --git a/src/stasis/operations/linkedListNTA.c b/src/stasis/operations/linkedListNTA.c index e2dc4c4..5e95cbb 100644 --- a/src/stasis/operations/linkedListNTA.c +++ b/src/stasis/operations/linkedListNTA.c @@ -3,7 +3,7 @@ #include #include -#include +#include #include diff --git a/src/stasis/operations/naiveLinearHash.c b/src/stasis/operations/naiveLinearHash.c index 2ee575e..4bff250 100644 --- a/src/stasis/operations/naiveLinearHash.c +++ b/src/stasis/operations/naiveLinearHash.c @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include diff --git a/src/stasis/recovery2.c b/src/stasis/recovery2.c index dfc60c4..2e7701b 100644 --- a/src/stasis/recovery2.c +++ b/src/stasis/recovery2.c @@ -6,7 +6,7 @@ */ #include -#include +#include #include #include @@ -19,7 +19,7 @@ #include /** @todo Get rid of linkedlist */ -#include +#include #include // Needed for pageReadLSN. #include diff --git a/src/stasis/replacementPolicy/lru.c b/src/stasis/replacementPolicy/lru.c index 65de6b9..74d156f 100644 --- a/src/stasis/replacementPolicy/lru.c +++ b/src/stasis/replacementPolicy/lru.c @@ -2,8 +2,8 @@ #undef STLSEARCH // XXX -#include -#include +#include +#include #include #include diff --git a/src/stasis/concurrentHash.c b/src/stasis/util/concurrentHash.c similarity index 99% rename from src/stasis/concurrentHash.c rename to src/stasis/util/concurrentHash.c index e90ec87..128f26f 100644 --- a/src/stasis/concurrentHash.c +++ b/src/stasis/util/concurrentHash.c @@ -354,7 +354,7 @@ History: */ #define _XOPEN_SOURCE 600 #include -#include +#include #include #include diff --git a/src/stasis/crc32.c b/src/stasis/util/crc32.c similarity index 95% rename from src/stasis/crc32.c rename to src/stasis/util/crc32.c index 72e892c..f6e6104 100644 --- a/src/stasis/crc32.c +++ b/src/stasis/util/crc32.c @@ -1,5 +1,5 @@ // Calculate a CRC 32 checksum. -#include /*Added 10-6-04 */ +#include /*Added 10-6-04 */ // LAST MODIFIED:[7-28-93] diff --git a/src/stasis/doubleLinkedList.c b/src/stasis/util/doubleLinkedList.c similarity index 99% rename from src/stasis/doubleLinkedList.c rename to src/stasis/util/doubleLinkedList.c index 5fdb750..b7f8de9 100644 --- a/src/stasis/doubleLinkedList.c +++ b/src/stasis/util/doubleLinkedList.c @@ -1,5 +1,5 @@ #include -#include +#include #include typedef LL_ENTRY(value_t) value_t; diff --git a/src/stasis/hash.c b/src/stasis/util/hash.c similarity index 98% rename from src/stasis/hash.c rename to src/stasis/util/hash.c index 1e9d288..07e4b41 100644 --- a/src/stasis/hash.c +++ b/src/stasis/util/hash.c @@ -1,4 +1,4 @@ -#include +#include #include //#include /** diff --git a/src/stasis/lhtable.c b/src/stasis/util/lhtable.c similarity index 99% rename from src/stasis/lhtable.c rename to src/stasis/util/lhtable.c index 354bc94..69c3b3e 100644 --- a/src/stasis/lhtable.c +++ b/src/stasis/util/lhtable.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/src/stasis/linkedlist.c b/src/stasis/util/linkedlist.c similarity index 99% rename from src/stasis/linkedlist.c rename to src/stasis/util/linkedlist.c index 85ccb4e..3f6e55d 100644 --- a/src/stasis/linkedlist.c +++ b/src/stasis/util/linkedlist.c @@ -44,7 +44,7 @@ terms specified in this license. * * simple linked list *****************************/ -#include +#include #include void printList(LinkedList **l) { LinkedList * tmp = *l; diff --git a/src/stasis/util/min.c b/src/stasis/util/min.c index 9cd776f..dc8d2bd 100644 --- a/src/stasis/util/min.c +++ b/src/stasis/util/min.c @@ -1,6 +1,6 @@ #include #include -#include +#include #include static int cmp_lsn_t(const void *ap, const void *bp, const void *ign) { diff --git a/src/stasis/redblack.c b/src/stasis/util/redblack.c similarity index 99% rename from src/stasis/redblack.c rename to src/stasis/util/redblack.c index edb43fb..e16c87c 100644 --- a/src/stasis/redblack.c +++ b/src/stasis/util/redblack.c @@ -26,7 +26,7 @@ static char rcsid[]="$Id$"; #include #undef STLSEARCH -#include +#include #include #define assert(expr) diff --git a/src/stasis/rw.c b/src/stasis/util/rw.c similarity index 99% rename from src/stasis/rw.c rename to src/stasis/util/rw.c index d657bd3..acf0b64 100644 --- a/src/stasis/rw.c +++ b/src/stasis/util/rw.c @@ -1,4 +1,4 @@ -#include +#include #include //#undef pthread_cond_wait diff --git a/src/stasis/stlredblack.cpp b/src/stasis/util/stlredblack.cpp similarity index 97% rename from src/stasis/stlredblack.cpp rename to src/stasis/util/stlredblack.cpp index 8ef3062..c8fde9b 100644 --- a/src/stasis/stlredblack.cpp +++ b/src/stasis/util/stlredblack.cpp @@ -7,8 +7,8 @@ #include #include #undef STLSEARCH -#include -#include +#include +#include #include #undef end #undef try diff --git a/stasis/latches.h b/stasis/latches.h index 4ae4465..41bfdd2 100644 --- a/stasis/latches.h +++ b/stasis/latches.h @@ -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. diff --git a/stasis/concurrentHash.h b/stasis/util/concurrentHash.h similarity index 100% rename from stasis/concurrentHash.h rename to stasis/util/concurrentHash.h diff --git a/stasis/crc32.h b/stasis/util/crc32.h similarity index 100% rename from stasis/crc32.h rename to stasis/util/crc32.h diff --git a/stasis/doubleLinkedList.h b/stasis/util/doubleLinkedList.h similarity index 100% rename from stasis/doubleLinkedList.h rename to stasis/util/doubleLinkedList.h diff --git a/stasis/hash.h b/stasis/util/hash.h similarity index 98% rename from stasis/hash.h rename to stasis/util/hash.h index d4bbe60..3ef2125 100644 --- a/stasis/hash.h +++ b/stasis/util/hash.h @@ -1,5 +1,5 @@ -#include +#include #include #ifndef __HASH_H diff --git a/stasis/lhtable.h b/stasis/util/lhtable.h similarity index 100% rename from stasis/lhtable.h rename to stasis/util/lhtable.h diff --git a/stasis/linkedlist.h b/stasis/util/linkedlist.h similarity index 100% rename from stasis/linkedlist.h rename to stasis/util/linkedlist.h diff --git a/stasis/redblack.h b/stasis/util/redblack.h similarity index 100% rename from stasis/redblack.h rename to stasis/util/redblack.h diff --git a/stasis/rw.h b/stasis/util/rw.h similarity index 100% rename from stasis/rw.h rename to stasis/util/rw.h diff --git a/stasis/stlredblack.h b/stasis/util/stlredblack.h similarity index 100% rename from stasis/stlredblack.h rename to stasis/util/stlredblack.h diff --git a/test/stasis/check_concurrentHash.c b/test/stasis/check_concurrentHash.c index 031a20f..a5b24e1 100644 --- a/test/stasis/check_concurrentHash.c +++ b/test/stasis/check_concurrentHash.c @@ -49,7 +49,7 @@ terms specified in this license. #define _GNU_SOURCE #include "../check_includes.h" -#include +#include #include #include diff --git a/test/stasis/check_lhtable.c b/test/stasis/check_lhtable.c index a4bddb6..cf8accf 100644 --- a/test/stasis/check_lhtable.c +++ b/test/stasis/check_lhtable.c @@ -43,7 +43,7 @@ terms specified in this license. #define _GNU_SOURCE #include "../check_includes.h" -#include +#include #include #include diff --git a/test/stasis/check_linearHash.c b/test/stasis/check_linearHash.c index af36e1f..d01218a 100644 --- a/test/stasis/check_linearHash.c +++ b/test/stasis/check_linearHash.c @@ -43,7 +43,7 @@ terms specified in this license. #include "../check_includes.h" #include -#include +#include #include #include diff --git a/test/stasis/check_redblack.c b/test/stasis/check_redblack.c index ab1c02f..9b102bd 100644 --- a/test/stasis/check_redblack.c +++ b/test/stasis/check_redblack.c @@ -7,8 +7,8 @@ extern int dbug_choice(int); #endif -#include -#include +#include +#include #include #include