more header cleaning; updated INSTALL
This commit is contained in:
parent
081c61b414
commit
0a308f035c
18 changed files with 60 additions and 116 deletions
6
INSTALL
6
INSTALL
|
@ -1,10 +1,10 @@
|
||||||
Prerequisites (ubuntu/debian):
|
Prerequisites (ubuntu/debian):
|
||||||
|
|
||||||
autoconf build-essential cmake
|
build-essential cmake
|
||||||
|
|
||||||
Recommended build procedure:
|
Recommended build procedure:
|
||||||
|
|
||||||
./bootstrap ; mkdir build ; cd build ; cmake ..
|
mkdir build ; cd build ; cmake ..
|
||||||
make -j 4
|
make -j 4
|
||||||
cd test ; make test
|
cd test ; make test
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ Optional dependencies:
|
||||||
Obsolete build procedure
|
Obsolete build procedure
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
(Uses automake and libtool)
|
(Uses autoconf, automake and libtool)
|
||||||
|
|
||||||
./reconf ; ./configure --quiet
|
./reconf ; ./configure --quiet
|
||||||
make -j 4
|
make -j 4
|
||||||
|
|
|
@ -44,13 +44,8 @@ terms specified in this license.
|
||||||
*
|
*
|
||||||
* implementation of the page buffer
|
* implementation of the page buffer
|
||||||
* *************************************************/
|
* *************************************************/
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#ifdef PROFILE_LATCHES_WRITE_ONLY
|
#ifdef PROFILE_LATCHES_WRITE_ONLY
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#include <stdio.h> // Need _GNU_SOURCE for asprintf
|
#include <stdio.h> // Need _GNU_SOURCE for asprintf
|
||||||
#include <stasis/lhtable.h>
|
#include <stasis/lhtable.h>
|
||||||
|
|
|
@ -5,13 +5,10 @@
|
||||||
allows bufferManager's implementation to focus on providing atomic
|
allows bufferManager's implementation to focus on providing atomic
|
||||||
writes, and locking.
|
writes, and locking.
|
||||||
*/
|
*/
|
||||||
#include <config.h>
|
|
||||||
#include <stasis/common.h>
|
#include <stasis/common.h>
|
||||||
|
|
||||||
#include <stasis/page.h>
|
#include <stasis/page.h>
|
||||||
|
|
||||||
#include <stasis/bufferManager.h>
|
#include <stasis/bufferManager.h>
|
||||||
|
|
||||||
#include <stasis/bufferManager/legacy/pageCache.h>
|
#include <stasis/bufferManager/legacy/pageCache.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -57,7 +54,7 @@ static void headInsert(Page *ret) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void middleInsert(Page *ret) {
|
static void middleInsert(Page *ret) {
|
||||||
|
|
||||||
assert(cache_state == FULL);
|
assert(cache_state == FULL);
|
||||||
|
|
||||||
/* assert( bufferSize == MAX_BUFFER_SIZE ); */
|
/* assert( bufferSize == MAX_BUFFER_SIZE ); */
|
||||||
|
@ -82,7 +79,7 @@ static void qRemove(Page *ret) {
|
||||||
assert(cache_state == FULL);
|
assert(cache_state == FULL);
|
||||||
|
|
||||||
assert(ret->next != ret && ret->prev != ret);
|
assert(ret->next != ret && ret->prev != ret);
|
||||||
|
|
||||||
if( ret->prev )
|
if( ret->prev )
|
||||||
ret->prev->next = ret->next;
|
ret->prev->next = ret->next;
|
||||||
else /* is head */
|
else /* is head */
|
||||||
|
@ -90,7 +87,7 @@ static void qRemove(Page *ret) {
|
||||||
if( ret->next ) {
|
if( ret->next ) {
|
||||||
ret->next->prev = ret->prev;
|
ret->next->prev = ret->prev;
|
||||||
/* TODO: these if can be better organizeed for speed */
|
/* TODO: these if can be better organizeed for speed */
|
||||||
if( ret == repMiddle )
|
if( ret == repMiddle )
|
||||||
/* select new middle */
|
/* select new middle */
|
||||||
repMiddle = ret->next;
|
repMiddle = ret->next;
|
||||||
}
|
}
|
||||||
|
@ -112,12 +109,12 @@ void cacheInsertPage (Page * ret) {
|
||||||
if(bufferSize == MAX_BUFFER_SIZE/* - 1*/) { /* Set up page kick mechanism. */
|
if(bufferSize == MAX_BUFFER_SIZE/* - 1*/) { /* Set up page kick mechanism. */
|
||||||
int i;
|
int i;
|
||||||
Page *iter;
|
Page *iter;
|
||||||
|
|
||||||
cache_state = FULL;
|
cache_state = FULL;
|
||||||
|
|
||||||
headInsert(ret);
|
headInsert(ret);
|
||||||
assert(ret->next != ret && ret->prev != ret);
|
assert(ret->next != ret && ret->prev != ret);
|
||||||
|
|
||||||
/* split up queue:
|
/* split up queue:
|
||||||
* "in all cases studied ... fixing the primary region to 30% ...
|
* "in all cases studied ... fixing the primary region to 30% ...
|
||||||
* resulted in the best performance"
|
* resulted in the best performance"
|
||||||
|
@ -127,7 +124,7 @@ void cacheInsertPage (Page * ret) {
|
||||||
repMiddle->queue = 1;
|
repMiddle->queue = 1;
|
||||||
repMiddle = repMiddle->next;
|
repMiddle = repMiddle->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
for( iter = repMiddle; iter; iter = iter->next ) {
|
for( iter = repMiddle; iter; iter = iter->next ) {
|
||||||
iter->queue = 2;
|
iter->queue = 2;
|
||||||
}
|
}
|
||||||
|
@ -154,12 +151,12 @@ void cacheHitOnPage(Page * ret) {
|
||||||
qRemove(ret);
|
qRemove(ret);
|
||||||
headInsert(ret);
|
headInsert(ret);
|
||||||
assert(ret->next != ret && ret->prev != ret);
|
assert(ret->next != ret && ret->prev != ret);
|
||||||
|
|
||||||
if( ret->queue == 2 ) {
|
if( ret->queue == 2 ) {
|
||||||
/* keep first queue same size */
|
/* keep first queue same size */
|
||||||
repMiddle = repMiddle->prev;
|
repMiddle = repMiddle->prev;
|
||||||
repMiddle->queue = 2;
|
repMiddle->queue = 2;
|
||||||
|
|
||||||
ret->queue = 1;
|
ret->queue = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
#include <stasis/common.h>
|
#include <stasis/common.h>
|
||||||
|
|
||||||
#include <stasis/latches.h>
|
#include <stasis/latches.h>
|
||||||
|
|
||||||
#include <pbl/pbl.h>
|
#include <pbl/pbl.h>
|
||||||
#include <errno.h>
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#undef pthread_mutex_t
|
#undef pthread_mutex_t
|
||||||
|
@ -20,15 +18,15 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
int __lladd_pthread_mutex_init(lladd_pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr,
|
int __lladd_pthread_mutex_init(lladd_pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr,
|
||||||
const char * file, int line, const char * name) {
|
const char * file, int line, const char * name) {
|
||||||
|
|
||||||
mutex->file = file;
|
mutex->file = file;
|
||||||
mutex->line = line;
|
mutex->line = line;
|
||||||
mutex->name = name;
|
mutex->name = name;
|
||||||
|
|
||||||
init_tuple(&(mutex->tup));
|
init_tuple(&(mutex->tup));
|
||||||
|
|
||||||
mutex->lockpoints = pblHtCreate();
|
mutex->lockpoints = pblHtCreate();
|
||||||
|
|
||||||
return pthread_mutex_init(&(mutex->mutex), mutexattr);
|
return pthread_mutex_init(&(mutex->mutex), mutexattr);
|
||||||
|
@ -47,14 +45,14 @@ int __lladd_pthread_mutex_lock(lladd_pthread_mutex_t *mutex, char * file, int li
|
||||||
while(EBUSY == (ret = pthread_mutex_trylock(&(mutex->mutex)))) {
|
while(EBUSY == (ret = pthread_mutex_trylock(&(mutex->mutex)))) {
|
||||||
blockCount ++;
|
blockCount ++;
|
||||||
pthread_yield();
|
pthread_yield();
|
||||||
|
|
||||||
if(blockCount >= 30000 && ! (blockCount % 30000)) {
|
if(blockCount >= 30000 && ! (blockCount % 30000)) {
|
||||||
printf("Spinning at %s:%d, %ld times. Held by: %s\n", file, line, blockCount, mutex->last_acquired_at);
|
printf("Spinning at %s:%d, %ld times. Held by: %s\n", file, line, blockCount, mutex->last_acquired_at);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
profile_tuple * tup = pblHtLookup(mutex->lockpoints, location, location_length+1);
|
profile_tuple * tup = pblHtLookup(mutex->lockpoints, location, location_length+1);
|
||||||
|
|
||||||
|
@ -62,9 +60,9 @@ int __lladd_pthread_mutex_lock(lladd_pthread_mutex_t *mutex, char * file, int li
|
||||||
|
|
||||||
if(!tup) {
|
if(!tup) {
|
||||||
tup = malloc(sizeof(profile_tuple));
|
tup = malloc(sizeof(profile_tuple));
|
||||||
|
|
||||||
init_tuple(tup);
|
init_tuple(tup);
|
||||||
|
|
||||||
pblHtInsert(mutex->lockpoints, location, location_length+1, tup);
|
pblHtInsert(mutex->lockpoints, location, location_length+1, tup);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -89,18 +87,18 @@ int __lladd_pthread_mutex_unlock(lladd_pthread_mutex_t *mutex) {
|
||||||
}
|
}
|
||||||
int __lladd_pthread_mutex_destroy(lladd_pthread_mutex_t *mutex) {
|
int __lladd_pthread_mutex_destroy(lladd_pthread_mutex_t *mutex) {
|
||||||
|
|
||||||
// Dump profiling info to stdout
|
// Dump profiling info to stdout
|
||||||
|
|
||||||
profile_tuple * tup;
|
profile_tuple * tup;
|
||||||
|
|
||||||
printf("Free mutex %s Init: %s %d\n ", mutex->name, mutex->file, mutex->line);
|
printf("Free mutex %s Init: %s %d\n ", mutex->name, mutex->file, mutex->line);
|
||||||
print_profile_tuple(&(mutex->tup));
|
print_profile_tuple(&(mutex->tup));
|
||||||
printf("\n Lock points: [mean, stddev, max] \n");
|
printf("\n Lock points: [mean, stddev, max] \n");
|
||||||
|
|
||||||
// Now, iterate over all of the lockpoints:
|
// Now, iterate over all of the lockpoints:
|
||||||
|
|
||||||
for(tup = pblHtFirst(mutex->lockpoints); tup; tup = pblHtNext(mutex->lockpoints)) {
|
for(tup = pblHtFirst(mutex->lockpoints); tup; tup = pblHtNext(mutex->lockpoints)) {
|
||||||
printf("\t%s ", (char*)pblHtCurrentKey(mutex->lockpoints));
|
printf("\t%s ", (char*)pblHtCurrentKey(mutex->lockpoints));
|
||||||
print_profile_tuple(tup);
|
print_profile_tuple(tup);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
free(tup);
|
free(tup);
|
||||||
|
@ -113,12 +111,12 @@ int __lladd_pthread_mutex_destroy(lladd_pthread_mutex_t *mutex) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo The profiled version of pthread_cond_wait isn't really implemented, so it throws off the mutex statistics.
|
// @todo The profiled version of pthread_cond_wait isn't really implemented, so it throws off the mutex statistics.
|
||||||
int __lladd_pthread_cond_wait(pthread_cond_t *cond, lladd_pthread_mutex_t *mutex,
|
int __lladd_pthread_cond_wait(pthread_cond_t *cond, lladd_pthread_mutex_t *mutex,
|
||||||
char * file, int line, char * cond_name, char * mutex_name) {
|
char * file, int line, char * cond_name, char * mutex_name) {
|
||||||
int ret;
|
int ret;
|
||||||
char * location;
|
char * location;
|
||||||
int location_length;
|
int location_length;
|
||||||
|
|
||||||
profile_tuple * tup = pblHtLookup(mutex->lockpoints, mutex->last_acquired_at, strlen(mutex->last_acquired_at)+1);
|
profile_tuple * tup = pblHtLookup(mutex->lockpoints, mutex->last_acquired_at, strlen(mutex->last_acquired_at)+1);
|
||||||
|
|
||||||
|
@ -137,9 +135,9 @@ int __lladd_pthread_cond_wait(pthread_cond_t *cond, lladd_pthread_mutex_t *mutex
|
||||||
|
|
||||||
if(!tup) {
|
if(!tup) {
|
||||||
tup = malloc(sizeof(profile_tuple));
|
tup = malloc(sizeof(profile_tuple));
|
||||||
|
|
||||||
init_tuple(tup);
|
init_tuple(tup);
|
||||||
|
|
||||||
pblHtInsert(mutex->lockpoints, location, location_length+1, tup);
|
pblHtInsert(mutex->lockpoints, location, location_length+1, tup);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -176,7 +174,7 @@ __profile_rwl *__profile_rw_initlock (char * file, int line) {
|
||||||
init_tuple(&(ret->tup));
|
init_tuple(&(ret->tup));
|
||||||
|
|
||||||
ret->lockpoints = pblHtCreate();
|
ret->lockpoints = pblHtCreate();
|
||||||
|
|
||||||
ret->lock = initlock();
|
ret->lock = initlock();
|
||||||
ret->holder = 0;
|
ret->holder = 0;
|
||||||
ret->readCount = 0;
|
ret->readCount = 0;
|
||||||
|
@ -286,7 +284,7 @@ void __profile_readunlock (__profile_rwl *lock) {
|
||||||
pthread_t self = pthread_self();
|
pthread_t self = pthread_self();
|
||||||
assert(lock->holder == self);
|
assert(lock->holder == self);
|
||||||
lock->readCount--;
|
lock->readCount--;
|
||||||
if(!lock->readCount) {
|
if(!lock->readCount) {
|
||||||
lock->holder = 0;
|
lock->holder = 0;
|
||||||
free(lock->last_acquired_at); // last_acquired_at gets leaked by readunlock.
|
free(lock->last_acquired_at); // last_acquired_at gets leaked by readunlock.
|
||||||
writeunlock(lock->lock);
|
writeunlock(lock->lock);
|
||||||
|
@ -310,7 +308,7 @@ void __profile_writeunlock (__profile_rwl *lock) {
|
||||||
|
|
||||||
void __profile_unlock (__profile_rwl * lock) {
|
void __profile_unlock (__profile_rwl * lock) {
|
||||||
#ifdef PROFILE_LATCHES_WRITE_ONLY
|
#ifdef PROFILE_LATCHES_WRITE_ONLY
|
||||||
if(!lock->readCount) {
|
if(!lock->readCount) {
|
||||||
#else
|
#else
|
||||||
if(lock->lock->writers) {
|
if(lock->lock->writers) {
|
||||||
#endif
|
#endif
|
||||||
|
@ -339,18 +337,18 @@ void __profile_deletelock (__profile_rwl *lock) {
|
||||||
printf("Free rwl init: %s %d\t ", lock->file, lock->line);
|
printf("Free rwl init: %s %d\t ", lock->file, lock->line);
|
||||||
print_profile_tuple(&(lock->tup));
|
print_profile_tuple(&(lock->tup));
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("Lock points: [mean, stddev, max] \n");
|
printf("Lock points: [mean, stddev, max] \n");
|
||||||
|
|
||||||
for(tup = pblHtFirst(lock->lockpoints); tup; tup = pblHtNext(lock->lockpoints)) {
|
for(tup = pblHtFirst(lock->lockpoints); tup; tup = pblHtNext(lock->lockpoints)) {
|
||||||
printf("\t%s ", (char*)pblHtCurrentKey(lock->lockpoints));
|
printf("\t%s ", (char*)pblHtCurrentKey(lock->lockpoints));
|
||||||
print_profile_tuple(tup);
|
print_profile_tuple(tup);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
free(tup);
|
free(tup);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
for(tup = pblHtFirst(lock->lockpoints); tup; tup = pblHtNext(lock->lockpoints)) {
|
for(tup = pblHtFirst(lock->lockpoints); tup; tup = pblHtNext(lock->lockpoints)) {
|
||||||
free(tup);
|
free(tup);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
pblHtDelete(lock->lockpoints);
|
pblHtDelete(lock->lockpoints);
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,10 @@
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#define _XOPEN_SOURCE 500
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
|
|
||||||
#include <stasis/common.h>
|
|
||||||
#include <stasis/io/handle.h>
|
#include <stasis/io/handle.h>
|
||||||
#include <pthread.h>
|
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@file
|
@file
|
||||||
|
|
|
@ -4,9 +4,6 @@
|
||||||
* Created on: May 12, 2009
|
* Created on: May 12, 2009
|
||||||
* Author: sears
|
* Author: sears
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
#include <stasis/common.h>
|
|
||||||
#include <stasis/logger/logger2.h>
|
#include <stasis/logger/logger2.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -39,16 +39,13 @@ authors grant the U.S. Government and others acting in its behalf
|
||||||
permission to use and distribute the software in accordance with the
|
permission to use and distribute the software in accordance with the
|
||||||
terms specified in this license.
|
terms specified in this license.
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
#include <stasis/common.h>
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include <stasis/page.h> // For stasis_record_type_to_size()
|
#include <stasis/page.h> // For stasis_record_type_to_size()
|
||||||
#include <stasis/logger/logger2.h> // needed for LoggerSizeOfInternalLogEntry()
|
#include <stasis/logger/logger2.h> // needed for LoggerSizeOfInternalLogEntry()
|
||||||
#include <stasis/logger/logEntry.h>
|
#include <stasis/logger/logEntry.h>
|
||||||
#include <stasis/crc32.h>
|
#include <stasis/crc32.h>
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
LogEntry * allocCommonLogEntry(lsn_t prevLSN, int xid, unsigned int type) {
|
LogEntry * allocCommonLogEntry(lsn_t prevLSN, int xid, unsigned int type) {
|
||||||
LogEntry * ret = calloc(1,sizeof(struct __raw_log_entry));
|
LogEntry * ret = calloc(1,sizeof(struct __raw_log_entry));
|
||||||
ret->LSN = -1;
|
ret->LSN = -1;
|
||||||
|
|
|
@ -45,13 +45,7 @@ terms specified in this license.
|
||||||
|
|
||||||
Abstract log implementation. Provides access to methods that
|
Abstract log implementation. Provides access to methods that
|
||||||
directly read and write log entries, force the log to disk, etc.
|
directly read and write log entries, force the log to disk, etc.
|
||||||
|
|
||||||
@todo Switch logger2 to use function pointers
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
#include <stasis/common.h>
|
|
||||||
|
|
||||||
#include <stasis/logger/logger2.h>
|
#include <stasis/logger/logger2.h>
|
||||||
|
|
||||||
#include <stasis/logger/safeWrites.h>
|
#include <stasis/logger/safeWrites.h>
|
||||||
|
|
|
@ -3,7 +3,7 @@ This software is copyrighted by the Regents of the University of
|
||||||
California, and other parties. The following terms apply to all files
|
California, and other parties. The following terms apply to all files
|
||||||
associated with the software unless explicitly disclaimed in
|
associated with the software unless explicitly disclaimed in
|
||||||
individual files.
|
individual files.
|
||||||
|
|
||||||
The authors hereby grant permission to use, copy, modify, distribute,
|
The authors hereby grant permission to use, copy, modify, distribute,
|
||||||
and license this software and its documentation for any purpose,
|
and license this software and its documentation for any purpose,
|
||||||
provided that existing copyright notices are retained in all copies
|
provided that existing copyright notices are retained in all copies
|
||||||
|
@ -13,20 +13,20 @@ authorized uses. Modifications to this software may be copyrighted by
|
||||||
their authors and need not follow the licensing terms described here,
|
their authors and need not follow the licensing terms described here,
|
||||||
provided that the new terms are clearly indicated on the first page of
|
provided that the new terms are clearly indicated on the first page of
|
||||||
each file where they apply.
|
each file where they apply.
|
||||||
|
|
||||||
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
|
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
|
||||||
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
||||||
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
|
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
|
||||||
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
|
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
|
||||||
POSSIBILITY OF SUCH DAMAGE.
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
|
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
|
||||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
|
||||||
NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND
|
NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND
|
||||||
THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
|
THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
|
||||||
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||||
|
|
||||||
GOVERNMENT USE: If you are acquiring this software on behalf of the
|
GOVERNMENT USE: If you are acquiring this software on behalf of the
|
||||||
U.S. government, the Government shall have only "Restricted Rights" in
|
U.S. government, the Government shall have only "Restricted Rights" in
|
||||||
the software and related documentation as defined in the Federal
|
the software and related documentation as defined in the Federal
|
||||||
|
@ -39,15 +39,12 @@ authors grant the U.S. Government and others acting in its behalf
|
||||||
permission to use and distribute the software in accordance with the
|
permission to use and distribute the software in accordance with the
|
||||||
terms specified in this license.
|
terms specified in this license.
|
||||||
---*/
|
---*/
|
||||||
#include <config.h>
|
|
||||||
#include <stasis/common.h>
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include <stasis/operations.h>
|
#include <stasis/operations.h>
|
||||||
#include <stasis/logger/logEntry.h>
|
#include <stasis/logger/logEntry.h>
|
||||||
#include <stasis/page.h>
|
#include <stasis/page.h>
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
static stasis_operation_impl stasis_operation_table[MAX_OPERATIONS];
|
static stasis_operation_impl stasis_operation_table[MAX_OPERATIONS];
|
||||||
|
|
||||||
void stasis_operation_impl_register(stasis_operation_impl o) {
|
void stasis_operation_impl_register(stasis_operation_impl o) {
|
||||||
|
@ -86,18 +83,18 @@ void stasis_operation_table_init() {
|
||||||
// placeholder
|
// placeholder
|
||||||
stasis_operation_impl_register(stasis_op_impl_dealloc());
|
stasis_operation_impl_register(stasis_op_impl_dealloc());
|
||||||
stasis_operation_impl_register(stasis_op_impl_realloc());
|
stasis_operation_impl_register(stasis_op_impl_realloc());
|
||||||
|
|
||||||
stasis_operation_impl_register(stasis_op_impl_page_set_range());
|
stasis_operation_impl_register(stasis_op_impl_page_set_range());
|
||||||
stasis_operation_impl_register(stasis_op_impl_page_set_range_inverse());
|
stasis_operation_impl_register(stasis_op_impl_page_set_range_inverse());
|
||||||
|
|
||||||
stasis_operation_impl_register(stasis_op_impl_noop());
|
stasis_operation_impl_register(stasis_op_impl_noop());
|
||||||
|
|
||||||
stasis_operation_impl_register(stasis_op_impl_array_list_header_init());
|
stasis_operation_impl_register(stasis_op_impl_array_list_header_init());
|
||||||
stasis_operation_impl_register(stasis_op_impl_page_initialize());
|
stasis_operation_impl_register(stasis_op_impl_page_initialize());
|
||||||
|
|
||||||
stasis_operation_impl_register(stasis_op_impl_set_range());
|
stasis_operation_impl_register(stasis_op_impl_set_range());
|
||||||
stasis_operation_impl_register(stasis_op_impl_set_range_inverse());
|
stasis_operation_impl_register(stasis_op_impl_set_range_inverse());
|
||||||
|
|
||||||
stasis_operation_impl_register(stasis_op_impl_linked_list_insert());
|
stasis_operation_impl_register(stasis_op_impl_linked_list_insert());
|
||||||
stasis_operation_impl_register(stasis_op_impl_linked_list_remove());
|
stasis_operation_impl_register(stasis_op_impl_linked_list_remove());
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#include <stasis/operations/arrayList.h>
|
#include <stasis/operations/arrayList.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "config.h"
|
|
||||||
#include <stasis/page.h>
|
#include <stasis/page.h>
|
||||||
#include <stasis/operations.h>
|
#include <stasis/operations.h>
|
||||||
#include <stasis/logger/logger2.h>
|
#include <stasis/logger/logger2.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
typedef struct regionAllocLogArg{
|
typedef struct regionAllocLogArg{
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#include "config.h"
|
|
||||||
#include <stasis/page.h>
|
#include <stasis/page.h>
|
||||||
#include <stasis/page/slotted.h>
|
#include <stasis/page/slotted.h>
|
||||||
//#include <assert.h>
|
//#include <assert.h>
|
||||||
|
|
|
@ -5,13 +5,6 @@
|
||||||
Implements three phase recovery
|
Implements three phase recovery
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
#include <stasis/common.h>
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include <pbl/pbl.h>
|
#include <pbl/pbl.h>
|
||||||
|
|
||||||
#include <stasis/recovery.h>
|
#include <stasis/recovery.h>
|
||||||
|
@ -26,6 +19,9 @@
|
||||||
#include <stasis/linkedlist.h>
|
#include <stasis/linkedlist.h>
|
||||||
#include <stasis/page.h> // Needed for pageReadLSN.
|
#include <stasis/page.h> // Needed for pageReadLSN.
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
static pblHashTable_t * transactionLSN;
|
static pblHashTable_t * transactionLSN;
|
||||||
static LinkedList * rollbackLSNs = NULL;
|
static LinkedList * rollbackLSNs = NULL;
|
||||||
/** @todo There is no real reason to have this mutex (which prevents
|
/** @todo There is no real reason to have this mutex (which prevents
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#include <config.h>
|
|
||||||
#include <stasis/common.h>
|
#include <stasis/common.h>
|
||||||
#include <stasis/latches.h>
|
#include <stasis/latches.h>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#include <stasis/common.h>
|
|
||||||
#include <stasis/latches.h>
|
#include <stasis/latches.h>
|
||||||
#include <stasis/transactional.h>
|
#include <stasis/transactional.h>
|
||||||
#include <stasis/recovery.h>
|
#include <stasis/recovery.h>
|
||||||
|
|
|
@ -122,10 +122,6 @@ typedef int16_t pagetype_t;
|
||||||
/*#define PROFILE_LATCHES*/
|
/*#define PROFILE_LATCHES*/
|
||||||
/*#define NO_LATCHES */
|
/*#define NO_LATCHES */
|
||||||
|
|
||||||
#if _POSIX_C_SOURCE >= 199309L || _XOPEN_SOURCE >= 500
|
|
||||||
#define HAVE_FDATASYNC
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DEBUGGING
|
#ifdef DEBUGGING
|
||||||
/** @todo Files that use DEBUG have to pull in stdio.h, which is a pain! */
|
/** @todo Files that use DEBUG have to pull in stdio.h, which is a pain! */
|
||||||
#define DEBUG(...) \
|
#define DEBUG(...) \
|
||||||
|
@ -162,8 +158,6 @@ typedef struct {
|
||||||
*/
|
*/
|
||||||
typedef struct Page_s Page;
|
typedef struct Page_s Page;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "compensations.h"
|
#include "compensations.h"
|
||||||
|
|
||||||
#endif /* __stasis_common_h */
|
#endif /* __stasis_common_h */
|
||||||
|
|
|
@ -39,9 +39,6 @@ authors grant the U.S. Government and others acting in its behalf
|
||||||
permission to use and distribute the software in accordance with the
|
permission to use and distribute the software in accordance with the
|
||||||
terms specified in this license.
|
terms specified in this license.
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#include "../check_includes.h"
|
#include "../check_includes.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <libdfa/networksetup.h>
|
#include <libdfa/networksetup.h>
|
||||||
|
|
|
@ -46,14 +46,11 @@ terms specified in this license.
|
||||||
#include <stasis/logger/logMemory.h>
|
#include <stasis/logger/logMemory.h>
|
||||||
#include <pbl/pbl.h>
|
#include <pbl/pbl.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <config.h>
|
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#define LOG_NAME "check_iterator.log"
|
#define LOG_NAME "check_iterator.log"
|
||||||
|
|
||||||
#define NUM_BYTES_IN_FIFO 1000
|
#define NUM_BYTES_IN_FIFO 1000
|
||||||
|
|
Loading…
Reference in a new issue