Ported LLADD to Fedora, cleaned up autoconf setup, and numerouse #includes that were problematic.

This commit is contained in:
Sears Russell 2004-07-06 01:22:18 +00:00
parent f8015a5687
commit e1d3bf7a0c
51 changed files with 471 additions and 2040 deletions

5
README
View file

@ -19,6 +19,11 @@ after configure.
We haven't tested make install. ;) We haven't tested make install. ;)
If you want to install check to a non-standard location, try this:
./configure --with-check=/home/eecs/sears/check
This package contains a copy of Peter Graf's Program Base Library, PBL, which is This package contains a copy of Peter Graf's Program Base Library, PBL, which is
distributed under the terms of the LGPL. distributed under the terms of the LGPL.

View file

@ -1,2 +0,0 @@
autoscan: warning: missing AC_PROG_RANLIB wanted by:
ltmain.sh:6370

View file

@ -1,10 +1,8 @@
# -*- Autoconf -*- # -*- Autoconf -*-
# Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
PACKAGE=LLADD AC_PREREQ(2.57)
VERSION=0.1 AC_INIT(LLADD, 0.1, sears@cs.berkeley.edu)
AC_PREREQ(2.59)
AC_INIT(PACKAGE, VERSION, sears@cs.berkeley.edu)
AM_INIT_AUTOMAKE(hello,0.1) AM_INIT_AUTOMAKE(hello,0.1)
AC_CONFIG_SRCDIR([config.h.in]) AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADER([config.h]) AC_CONFIG_HEADER([config.h])
@ -22,10 +20,15 @@ AC_PROG_LIBTOOL
# Checks for libraries. # Checks for libraries.
AM_PATH_CHECK(,[have_check="yes"], #AM_PATH_CHECK(,[have_check="yes"],
# AC_MSG_WARN([Check not found; cannot run unit tests!])
# [have_check="no"])
#AM_CONDITIONAL(HAVE_CHECK, test x"$have_check", "xyes")
AM_PATH_CHECK(,[have_check=true],
AC_MSG_WARN([Check not found; cannot run unit tests!]) AC_MSG_WARN([Check not found; cannot run unit tests!])
[have_check="no"]) [have_check=false])
AM_CONDITIONAL(HAVE_CHECK, test x"$have_check", "xyes") AM_CONDITIONAL(HAVE_CHECK, test x$have_check = xtrue)
## alas, it won't link if this is put in here.. instead, it's linked in manually in the test directory... ## alas, it won't link if this is put in here.. instead, it's linked in manually in the test directory...
@ -42,11 +45,14 @@ AM_CONDITIONAL(HAVE_CHECK, test x"$have_check", "xyes")
#AC_CHECK_LIB(efence,memalign) #AC_CHECK_LIB(efence,memalign)
#fi #fi
AC_CHECK_LIB([m], [sqrt])
AC_CHECK_LIB([pthread], [pthread_create])
# Checks for header files. # Checks for header files.
AC_HEADER_DIRENT AC_HEADER_DIRENT
AC_HEADER_STDC AC_HEADER_STDC
AC_HEADER_SYS_WAIT AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h malloc.h memory.h netdb.h netinet/in.h stddef.h stdlib.h string.h strings.h sys/socket.h sys/time.h syslog.h unistd.h]) AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h malloc.h memory.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/socket.h sys/time.h syslog.h unistd.h errno.h])
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST AC_C_CONST
@ -57,11 +63,8 @@ AC_HEADER_TIME
# Checks for library functions. # Checks for library functions.
AC_FUNC_MALLOC AC_FUNC_MALLOC
AC_FUNC_MEMCMP AC_FUNC_MEMCMP
AC_FUNC_MMAP
AC_FUNC_STAT AC_FUNC_STAT
AC_CHECK_FUNCS([bzero fdatasync getcwd gettimeofday inet_ntoa memmove memset mkdir munmap socket strchr strdup strerror strrchr strstr strtoul]) AC_CHECK_FUNCS([bzero fdatasync getcwd gettimeofday inet_ntoa memmove memset mkdir socket sqrt strchr strdup strerror strrchr strstr strtoul])
AC_CHECK_LIB(pthread, pthread_create)
AC_CONFIG_FILES([Makefile AC_CONFIG_FILES([Makefile
libdfa/Makefile libdfa/Makefile
@ -76,13 +79,13 @@ AC_CONFIG_FILES([Makefile
src/lladd/Makefile src/lladd/Makefile
src/pbl/Makefile src/pbl/Makefile
src/timing/Makefile src/timing/Makefile
utilities/Makefile
test/2pc/Makefile test/2pc/Makefile
test/Makefile test/Makefile
test/cht/Makefile test/cht/Makefile
test/dfa/Makefile test/dfa/Makefile
test/lladd/Makefile
test/lladd-old/Makefile test/lladd-old/Makefile
test/lladd/Makefile
test/messages/Makefile test/messages/Makefile
test/monotree/Makefile]) test/monotree/Makefile
utilities/Makefile])
AC_OUTPUT AC_OUTPUT

View file

@ -1,309 +0,0 @@
# Makefile.in generated by automake 1.8.5 from Makefile.am.
# libdfa/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
srcdir = .
top_srcdir = ..
pkgdatadir = $(datadir)/hello
pkglibdir = $(libdir)/hello
pkgincludedir = $(includedir)/hello
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = /usr/bin/install -c
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_triplet = i686-pc-linux-gnu
subdir = libdfa
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /home/morph/lladd/missing --run aclocal-1.8
AMDEP_FALSE = #
AMDEP_TRUE =
AMTAR = ${SHELL} /home/morph/lladd/missing --run tar
AR = ar
AUTOCONF = ${SHELL} /home/morph/lladd/missing --run autoconf
AUTOHEADER = ${SHELL} /home/morph/lladd/missing --run autoheader
AUTOMAKE = ${SHELL} /home/morph/lladd/missing --run automake-1.8
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CHECK_CFLAGS =
CHECK_LIBS = -lcheck
CPP = gcc -E
CPPFLAGS =
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -g -O2
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO = echo
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = grep -E
EXEEXT =
F77 = g77
FFLAGS = -g -O2
HAVE_CHECK_FALSE = #
HAVE_CHECK_TRUE =
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
LDFLAGS =
LIBOBJS =
LIBS = -lpthread
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/morph/lladd/missing --run makeinfo
OBJEXT = o
PACKAGE = hello
PACKAGE_BUGREPORT = sears@cs.berkeley.edu
PACKAGE_NAME = PACKAGE
PACKAGE_STRING = PACKAGE VERSION
PACKAGE_TARNAME = package
PACKAGE_VERSION = VERSION
PATH_SEPARATOR = :
RANLIB = ranlib
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
VERSION = 0.1
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_CXX = g++
ac_ct_F77 = g77
ac_ct_RANLIB = ranlib
ac_ct_STRIP = strip
am__fastdepCC_FALSE = #
am__fastdepCC_TRUE =
am__fastdepCXX_FALSE = #
am__fastdepCXX_TRUE =
am__include = include
am__leading_dot = .
am__quote =
bindir = ${exec_prefix}/bin
build = i686-pc-linux-gnu
build_alias =
build_cpu = i686
build_os = linux-gnu
build_vendor = pc
datadir = ${prefix}/share
exec_prefix = ${prefix}
host = i686-pc-linux-gnu
host_alias =
host_cpu = i686
host_os = linux-gnu
host_vendor = pc
includedir = ${prefix}/include
infodir = ${prefix}/info
install_sh = /home/morph/lladd/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
mandir = ${prefix}/man
mkdir_p = mkdir -p -- .
oldincludedir = /usr/include
prefix = /usr/local
program_transform_name = s,x,x,
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
sysconfdir = ${prefix}/etc
target_alias =
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libdfa/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu libdfa/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -1,309 +0,0 @@
# Makefile.in generated by automake 1.8.5 from Makefile.am.
# lladd/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
srcdir = .
top_srcdir = ..
pkgdatadir = $(datadir)/hello
pkglibdir = $(libdir)/hello
pkgincludedir = $(includedir)/hello
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = /usr/bin/install -c
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_triplet = i686-pc-linux-gnu
subdir = lladd
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /home/morph/lladd/missing --run aclocal-1.8
AMDEP_FALSE = #
AMDEP_TRUE =
AMTAR = ${SHELL} /home/morph/lladd/missing --run tar
AR = ar
AUTOCONF = ${SHELL} /home/morph/lladd/missing --run autoconf
AUTOHEADER = ${SHELL} /home/morph/lladd/missing --run autoheader
AUTOMAKE = ${SHELL} /home/morph/lladd/missing --run automake-1.8
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CHECK_CFLAGS =
CHECK_LIBS = -lcheck
CPP = gcc -E
CPPFLAGS =
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -g -O2
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO = echo
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = grep -E
EXEEXT =
F77 = g77
FFLAGS = -g -O2
HAVE_CHECK_FALSE = #
HAVE_CHECK_TRUE =
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
LDFLAGS =
LIBOBJS =
LIBS = -lpthread
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/morph/lladd/missing --run makeinfo
OBJEXT = o
PACKAGE = hello
PACKAGE_BUGREPORT = sears@cs.berkeley.edu
PACKAGE_NAME = PACKAGE
PACKAGE_STRING = PACKAGE VERSION
PACKAGE_TARNAME = package
PACKAGE_VERSION = VERSION
PATH_SEPARATOR = :
RANLIB = ranlib
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
VERSION = 0.1
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_CXX = g++
ac_ct_F77 = g77
ac_ct_RANLIB = ranlib
ac_ct_STRIP = strip
am__fastdepCC_FALSE = #
am__fastdepCC_TRUE =
am__fastdepCXX_FALSE = #
am__fastdepCXX_TRUE =
am__include = include
am__leading_dot = .
am__quote =
bindir = ${exec_prefix}/bin
build = i686-pc-linux-gnu
build_alias =
build_cpu = i686
build_os = linux-gnu
build_vendor = pc
datadir = ${prefix}/share
exec_prefix = ${prefix}
host = i686-pc-linux-gnu
host_alias =
host_cpu = i686
host_os = linux-gnu
host_vendor = pc
includedir = ${prefix}/include
infodir = ${prefix}/info
install_sh = /home/morph/lladd/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
mandir = ${prefix}/man
mkdir_p = mkdir -p -- .
oldincludedir = /usr/include
prefix = /usr/local
program_transform_name = s,x,x,
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
sysconfdir = ${prefix}/etc
target_alias =
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lladd/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu lladd/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -110,7 +110,7 @@ Page loadPage(int pageid);
* @param size The size of the new record * @param size The size of the new record
* @return allocated record * @return allocated record
*/ */
recordid ralloc(int xid, size_t size); recordid ralloc(int xid, long size);
/** /**
* Find a page with some free space. * Find a page with some free space.

View file

@ -44,7 +44,15 @@ terms specified in this license.
* *
* A standard header file, adopted from Autobook. * A standard header file, adopted from Autobook.
* *
* @todo: Need to make sure everyone actually includes this thing, and also includes constants.h * The idea behind this file is twofold. First, we want to keep as
* much of the #ifdef portability nonsense in here as possible.
* Second, we allow users to #include headers that in turn #include
* common.h. If they do so, then their code should continue to 'do
* the right thing' and build, even though they do not #include the
* config.h file that all of the LLADD stuff uses.
*
* @todo: Need to make sure everyone actually includes this thing, and
* also includes constants.h
* *
* @ingroup LLADD_CORE * @ingroup LLADD_CORE
* *
@ -68,9 +76,6 @@ terms specified in this license.
# include "config.h" # include "config.h"
#endif */ #endif */
#include <stdio.h>
#include <sys/types.h>
#if STDC_HEADERS #if STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>
# include <string.h> # include <string.h>
@ -91,18 +96,13 @@ extern int errno;
#endif #endif
#define byte unsigned char #define byte unsigned char
#define lsn_t off_t #define lsn_t long
#define DEBUGGING #define DEBUGGING
/**
@todo Currently, latches obtained using rw.h are not currently profiled.
*/
#define PROFILE_LATCHES #define PROFILE_LATCHES
#ifdef DEBUGGING #ifdef DEBUGGING
/** @todo Files that use DEBUG have to pull in stdio.h, which is a pain! */
#define DEBUG(...) \ #define DEBUG(...) \
printf(__VA_ARGS__); fflush(NULL) printf(__VA_ARGS__); fflush(NULL)
#else #else
@ -110,86 +110,5 @@ extern int errno;
#endif /*DEBUGGING*/ #endif /*DEBUGGING*/
#include <pthread.h>
#include <pbl/pbl.h>
#include <lladd/stats.h>
/**
@todo Is it useful to track per-line spin counts?
*/
/*typedef struct {
double sum_x_hold;
double sum_xsquared_hold;
long max_hold;
long count;
} lladd_locking_profile_tuple;
*/
/**
A data structure for profiling latching behavior.
All time values recorded in this struct are in microseconds.
*/
typedef struct {
const char * file;
int line;
const char * name;
pthread_mutex_t mutex;
profile_tuple tup;
char * last_acquired_at;
pblHashTable_t * lockpoints;
} lladd_pthread_mutex_t;
#include <libdfa/rw.h>
/**
Keeps some profiling information along with a read/write lock.
*/
typedef struct {
const char * file;
int line;
rwl * lock;
profile_tuple tup;
char * last_acquired_at;
pblHashTable_t * lockpoints;
} __profile_rwl;
#ifdef PROFILE_LATCHES
#define pthread_mutex_t lladd_pthread_mutex_t
#define pthread_mutex_init(x, y) __lladd_pthread_mutex_init((x), (y), __FILE__, __LINE__, #x)
#define pthread_mutex_destroy(x) __lladd_pthread_mutex_destroy((x))
#define pthread_mutex_lock(x) __lladd_pthread_mutex_lock((x), __FILE__, __LINE__)
#define pthread_mutex_unlock(x) __lladd_pthread_mutex_unlock((x))
#define pthread_mutex_trylock(x) NO_PROFILING_EQUIVALENT_TO_PTHREAD_TRYLOCK
int __lladd_pthread_mutex_init(lladd_pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr, const char * file, int line, const char * mutex_name);
int __lladd_pthread_mutex_lock(lladd_pthread_mutex_t *mutex, char * file, int line);
int __lladd_pthread_mutex_unlock(lladd_pthread_mutex_t *mutex);
int __lladd_pthread_mutex_destroy(lladd_pthread_mutex_t *mutex);
#define initlock() __profile_rw_initlock(__FILE__, __LINE__)
#define readlock(x, y) __profile_readlock((x),(y), __FILE__, __LINE__)
#define writelock(x, y) __profile_writelock((x), (y), __FILE__, __LINE__)
#define readunlock(x) __profile_readunlock((x))
#define writeunlock(x) __profile_writeunlock((x))
#define deletelock(x) __profile_deletelock((x))
#define rwl __profile_rwl
rwl *__profile_rw_initlock (char * file, int line);
void __profile_readlock (rwl *lock, int d, char * file, int line);
void __profile_writelock (rwl *lock, int d, char * file, int line);
void __profile_readunlock (rwl *lock);
void __profile_writeunlock (rwl *lock);
void __profile_deletelock (rwl *lock);
#endif
#endif /* __lladd_common_h */ #endif /* __lladd_common_h */

View file

@ -120,7 +120,7 @@ LogEntry * allocCLRLogEntry (lsn_t prevLSN, int xid,
size_t sizeofLogEntry(const LogEntry * log); long sizeofLogEntry(const LogEntry * log);
const byte * getUpdateArgs(const LogEntry * log); const byte * getUpdateArgs(const LogEntry * log);
const byte * getUpdatePreImage(const LogEntry * log); const byte * getUpdatePreImage(const LogEntry * log);

View file

@ -53,11 +53,8 @@ terms specified in this license.
#ifndef __LOGGER2_H__ #ifndef __LOGGER2_H__
#define __LOGGER2_H__ #define __LOGGER2_H__
/*#include "logEntry.h"
#include "logHandle.h"*/
#include <lladd/operations.h> #include <lladd/operations.h>
/** /**
A callback function that allows logHandle's iterator to stop A callback function that allows logHandle's iterator to stop
returning log entries depending on the context in which it was returning log entries depending on the context in which it was

View file

@ -52,14 +52,8 @@ terms specified in this license.
#ifndef __OPERATIONS_H__ #ifndef __OPERATIONS_H__
#define __OPERATIONS_H__ #define __OPERATIONS_H__
/*#include <stddef.h>*/
/*#include "common.h"*/
#include <lladd/constants.h> #include <lladd/constants.h>
#include <lladd/transactional.h> /*#include <lladd/transactional.h>*/
#include <lladd/logger/logEntry.h> #include <lladd/logger/logEntry.h>
BEGIN_C_DECLS BEGIN_C_DECLS
@ -91,7 +85,7 @@ typedef struct {
takes. If set to SIZEOF_RECORD, then the size of the record takes. If set to SIZEOF_RECORD, then the size of the record
that the operation affects will be used instead. that the operation affects will be used instead.
*/ */
size_t sizeofData; long sizeofData;
/** /**
Does this operation supply an undo operation? Does this operation supply an undo operation?
@ -132,8 +126,10 @@ typedef struct {
} Operation; } Operation;
/* These need to be installed, since they are required by applications that use LLADD. */ /* These need to be installed, since they are required by applications that use LLADD. */
/*#include "constants.h" /*#include "constants.h"*/
#include <lladd/bufferManager.h>*/
/*#include <lladd/bufferManager.h>*/
/*#include "logger/logEntry.h"*/
#include "operations/increment.h" #include "operations/increment.h"
#include "operations/decrement.h" #include "operations/decrement.h"

View file

@ -5,7 +5,7 @@
Operation getAlloc(); Operation getAlloc();
Operation getDealloc(); Operation getDealloc();
recordid Talloc(int xid, size_t size); recordid Talloc(int xid, long size);
void Tdealloc(int xid, recordid rid); void Tdealloc(int xid, recordid rid);
#endif #endif

View file

@ -54,9 +54,7 @@ terms specified in this license.
#ifndef __DECREMENT_H__ #ifndef __DECREMENT_H__
#define __DECREMENT_H__ #define __DECREMENT_H__
/*#include "../constants.h"*/
#include <lladd/operations.h> #include <lladd/operations.h>
/*#include "../bufferManager.h"*/
#define Tdecrement(xid,rid) Tupdate(xid,rid,0, OPERATION_DECREMENT) #define Tdecrement(xid,rid) Tupdate(xid,rid,0, OPERATION_DECREMENT)

View file

@ -57,9 +57,7 @@ terms specified in this license.
#ifndef __INCREMENT_H__ #ifndef __INCREMENT_H__
#define __INCREMENT_H__ #define __INCREMENT_H__
/*#include "../constants.h"*/
#include <lladd/operations.h> #include <lladd/operations.h>
/*#include "../bufferManager.h"*/
#define Tincrement(xid,rid) Tupdate(xid,rid,0, OPERATION_INCREMENT) #define Tincrement(xid,rid) Tupdate(xid,rid,0, OPERATION_INCREMENT)

View file

@ -27,16 +27,14 @@
#ifndef __LLADDHASH_H__ #ifndef __LLADDHASH_H__
#define __LLADDHASH_H__ #define __LLADDHASH_H__
/*#include "../transactional.h"*/
#include <lladd/operations.h> #include <lladd/operations.h>
#define MAX_LLADDHASHES 1000 #define MAX_LLADDHASHES 1000
typedef struct { typedef struct {
recordid store; recordid store;
size_t keylen; int keylen;
size_t datlen; long datlen;
recordid next; recordid next;
} lladdHashItem_t; } lladdHashItem_t;
@ -55,21 +53,21 @@ typedef struct {
lladdHash_t * lHtCreate(int xid, int size); lladdHash_t * lHtCreate(int xid, int size);
int lHtValid(int xid, lladdHash_t *ht); int lHtValid(int xid, lladdHash_t *ht);
int lHtLookup( int xid, lladdHash_t *ht, const void *key, size_t keylen, void *buf ); int lHtLookup( int xid, lladdHash_t *ht, const void *key, int keylen, void *buf );
int lHtFirst( int xid, lladdHash_t *ht, void *buf ); int lHtFirst( int xid, lladdHash_t *ht, void *buf );
int lHtNext( int xid, lladdHash_t *ht, void *buf ); int lHtNext( int xid, lladdHash_t *ht, void *buf );
int lHtCurrent( int xid, lladdHash_t *ht, void *buf); int lHtCurrent( int xid, lladdHash_t *ht, void *buf);
int lHtCurrentKey(int xid, lladdHash_t *ht, void *buf); int lHtCurrentKey(int xid, lladdHash_t *ht, void *buf);
int lHtDelete(int xid, lladdHash_t *ht); int lHtDelete(int xid, lladdHash_t *ht);
int lHtPosition( int xid, lladdHash_t *ht, const void *key, size_t key_length ); int lHtPosition( int xid, lladdHash_t *ht, const void *key, int key_length );
/* These two are the only ones that result in a log entry... */ /* These two are the only ones that result in a log entry... */
/* /*
int _lHtInsert(int xid, lladdHash_t *ht, const void *key, size_t keylen, void * dat, size_t datlen); int _lHtInsert(int xid, lladdHash_t *ht, const void *key, int keylen, void * dat, long datlen);
int _lHtRemove( int xid, lladdHash_t *ht, const void *key, size_t keylen, void *buf ); int _lHtRemove( int xid, lladdHash_t *ht, const void *key, int keylen, void *buf );
*/ */
int lHtInsert(int xid, lladdHash_t *ht, const void *key, size_t keylen, void * dat, size_t datlen); int lHtInsert(int xid, lladdHash_t *ht, const void *key, int keylen, void * dat, long datlen);
int lHtRemove( int xid, lladdHash_t *ht, const void *key, size_t keylen, void *buf, size_t buflen); int lHtRemove( int xid, lladdHash_t *ht, const void *key, int keylen, void *buf, long buflen);
Operation getLHInsert(); Operation getLHInsert();
Operation getLHRemove(); Operation getLHRemove();

View file

@ -58,16 +58,13 @@ terms specified in this license.
BEGIN_C_DECLS BEGIN_C_DECLS
#include <stddef.h>
/*#include <pbl/pbl.h> */
/** /**
* represents how to look up a record on a page * represents how to look up a record on a page
*/ */
typedef struct { typedef struct {
int page; int page;
int slot; int slot;
size_t size; long size;
} recordid; } recordid;
@ -108,14 +105,24 @@ long pageReadLSN(Page page);
* parameter a Page, and returns an estimate of the amount of free space on this * parameter a Page, and returns an estimate of the amount of free space on this
* page. This is either exact, or an underestimate. * page. This is either exact, or an underestimate.
*/ */
size_t freespace(Page page); int freespace(Page page);
/** /**
* assumes that the page is already loaded in memory. It takes as * assumes that the page is already loaded in memory. It takes as
* parameters a Page and the size in bytes of the new record. pageRalloc() * parameters a Page and the size in bytes of the new record. pageRalloc()
* returns a recordid representing the newly allocated record. * returns a recordid representing the newly allocated record.
*
* NOTE: might want to pad records to be multiple of words in length, or, simply
* make sure all records start word aligned, but not necessarily having
* a length that is a multiple of words. (Since Tread(), Twrite() ultimately
* call memcpy(), this shouldn't be an issue)
*
* NOTE: pageRalloc() assumes that the caller already made sure that sufficient
* amount of freespace exists in this page. (@see freespace())
*
* @todo Makes no attempt to reuse old recordid's.
*/ */
recordid pageRalloc(Page page, size_t size); recordid pageRalloc(Page page, int size);
void pageWriteRecord(int xid, Page page, recordid rid, const byte *data); void pageWriteRecord(int xid, Page page, recordid rid, const byte *data);

View file

@ -147,7 +147,7 @@ int Tcommit(int xid);
* @returns A new recordid. On success, this recordid's size will be * @returns A new recordid. On success, this recordid's size will be
* the requested size. On failure, its size will be zero. * the requested size. On failure, its size will be zero.
*/ */
recordid Talloc(int xid, size_t size); recordid Talloc(int xid, long size);
/* @function Tabort /* @function Tabort
* @param xid transaction ID * @param xid transaction ID

133
m4/check.m4 Normal file
View file

@ -0,0 +1,133 @@
dnl AM_PATH_CHECK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for check, and define CHECK_CFLAGS and CHECK_LIBS
dnl
AC_DEFUN(AM_PATH_CHECK,
[
AC_ARG_WITH(check,
[ --with-check=PATH prefix where check is installed [default=auto]])
min_check_version=ifelse([$1], ,0.8.2,$1)
AC_MSG_CHECKING(for check - version >= $min_check_version)
if test x$with_check = xno; then
AC_MSG_RESULT(disabled)
ifelse([$3], , AC_MSG_ERROR([disabling check is not supported]), [$3])
else
if test "x$with_check" != x; then
CHECK_CFLAGS="-I$with_check/include"
CHECK_LIBS="-L$with_check/lib -lcheck"
else
CHECK_CFLAGS=""
CHECK_LIBS="-lcheck"
fi
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $CHECK_CFLAGS"
LIBS="$CHECK_LIBS $LIBS"
rm -f conf.check-test
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <check.h>
int main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.check-test");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = strdup("$min_check_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_check_version");
return 1;
}
if ((CHECK_MAJOR_VERSION != check_major_version) ||
(CHECK_MINOR_VERSION != check_minor_version) ||
(CHECK_MICRO_VERSION != check_micro_version))
{
printf("\n*** The check header file (version %d.%d.%d) does not match\n",
CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION);
printf("*** the check library (version %d.%d.%d).\n",
check_major_version, check_minor_version, check_micro_version);
return 1;
}
if ((check_major_version > major) ||
((check_major_version == major) && (check_minor_version > minor)) ||
((check_major_version == major) && (check_minor_version == minor) && (check_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of check (%d.%d.%d) was found.\n",
check_major_version, check_minor_version, check_micro_version);
printf("*** You need a version of check being at least %d.%d.%d.\n", major, minor, micro);
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the check library and header\n");
printf("*** file is being found. Rerun configure with the --with-check=PATH option\n");
printf("*** to specify the prefix where the correct version was installed.\n");
}
return 1;
}
],, no_check=yes, [echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
if test "x$no_check" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test -f conf.check-test ; then
:
else
echo "*** Could not run check test program, checking why..."
CFLAGS="$CFLAGS $CHECK_CFLAGS"
LIBS="$CHECK_LIBS $LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <stdlib.h>
#include <check.h>
], , [ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding check. You'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for"
echo "*** the exact error that occured." ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
CHECK_CFLAGS=""
CHECK_LIBS=""
rm -f conf.check-test
ifelse([$3], , AC_MSG_ERROR([check not found]), [$3])
fi
AC_SUBST(CHECK_CFLAGS)
AC_SUBST(CHECK_LIBS)
rm -f conf.check-test
fi
])

View file

@ -1,309 +0,0 @@
# Makefile.in generated by automake 1.8.5 from Makefile.am.
# pbl/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
srcdir = .
top_srcdir = ..
pkgdatadir = $(datadir)/hello
pkglibdir = $(libdir)/hello
pkgincludedir = $(includedir)/hello
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = /usr/bin/install -c
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_triplet = i686-pc-linux-gnu
subdir = pbl
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /home/morph/lladd/missing --run aclocal-1.8
AMDEP_FALSE = #
AMDEP_TRUE =
AMTAR = ${SHELL} /home/morph/lladd/missing --run tar
AR = ar
AUTOCONF = ${SHELL} /home/morph/lladd/missing --run autoconf
AUTOHEADER = ${SHELL} /home/morph/lladd/missing --run autoheader
AUTOMAKE = ${SHELL} /home/morph/lladd/missing --run automake-1.8
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CHECK_CFLAGS =
CHECK_LIBS = -lcheck
CPP = gcc -E
CPPFLAGS =
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -g -O2
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO = echo
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = grep -E
EXEEXT =
F77 = g77
FFLAGS = -g -O2
HAVE_CHECK_FALSE = #
HAVE_CHECK_TRUE =
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
LDFLAGS =
LIBOBJS =
LIBS = -lpthread
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/morph/lladd/missing --run makeinfo
OBJEXT = o
PACKAGE = hello
PACKAGE_BUGREPORT = sears@cs.berkeley.edu
PACKAGE_NAME = PACKAGE
PACKAGE_STRING = PACKAGE VERSION
PACKAGE_TARNAME = package
PACKAGE_VERSION = VERSION
PATH_SEPARATOR = :
RANLIB = ranlib
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
VERSION = 0.1
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_CXX = g++
ac_ct_F77 = g77
ac_ct_RANLIB = ranlib
ac_ct_STRIP = strip
am__fastdepCC_FALSE = #
am__fastdepCC_TRUE =
am__fastdepCXX_FALSE = #
am__fastdepCXX_TRUE =
am__include = include
am__leading_dot = .
am__quote =
bindir = ${exec_prefix}/bin
build = i686-pc-linux-gnu
build_alias =
build_cpu = i686
build_os = linux-gnu
build_vendor = pc
datadir = ${prefix}/share
exec_prefix = ${prefix}
host = i686-pc-linux-gnu
host_alias =
host_cpu = i686
host_os = linux-gnu
host_vendor = pc
includedir = ${prefix}/include
infodir = ${prefix}/info
install_sh = /home/morph/lladd/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
mandir = ${prefix}/man
mkdir_p = mkdir -p -- .
oldincludedir = /usr/include
prefix = /usr/local
program_transform_name = s,x,x,
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
sysconfdir = ${prefix}/etc
target_alias =
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pbl/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu pbl/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

8
reconf
View file

@ -1,11 +1,9 @@
#!/bin/sh #!/bin/sh
rm -f config.cache rm -f config.cache
rm -f acconfig.h rm -f acconfig.h
#touch acconfig.h aclocal -I m4
#aclocal -I m4
aclocal-1.8
autoconf autoconf
autoheader autoheader
#acconfig libtoolize --automake
automake-1.8 -a automake -a
exit exit

View file

@ -1,457 +0,0 @@
# Makefile.in generated by automake 1.8.5 from Makefile.am.
# src/apps/cyrus/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SOURCES = cyrusdb_lladd.c
srcdir = .
top_srcdir = ../../..
pkgdatadir = $(datadir)/hello
pkglibdir = $(libdir)/hello
pkgincludedir = $(includedir)/hello
top_builddir = ../../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = /usr/bin/install -c
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_triplet = i686-pc-linux-gnu
subdir = src/apps/cyrus
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(libdir)"
libLIBRARIES_INSTALL = $(INSTALL_DATA)
LIBRARIES = $(lib_LIBRARIES)
ARFLAGS = cru
libcyrusdb_lladd_a_AR = $(AR) $(ARFLAGS)
libcyrusdb_lladd_a_LIBADD =
am_libcyrusdb_lladd_a_OBJECTS = cyrusdb_lladd.$(OBJEXT)
libcyrusdb_lladd_a_OBJECTS = $(am_libcyrusdb_lladd_a_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
DEP_FILES = ./$(DEPDIR)/cyrusdb_lladd.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(libcyrusdb_lladd_a_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /home/morph/lladd/missing --run aclocal-1.8
AMDEP_FALSE = #
AMDEP_TRUE =
AMTAR = ${SHELL} /home/morph/lladd/missing --run tar
AR = ar
AUTOCONF = ${SHELL} /home/morph/lladd/missing --run autoconf
AUTOHEADER = ${SHELL} /home/morph/lladd/missing --run autoheader
AUTOMAKE = ${SHELL} /home/morph/lladd/missing --run automake-1.8
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CHECK_CFLAGS =
CHECK_LIBS = -lcheck
CPP = gcc -E
CPPFLAGS =
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -g -O2
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO = echo
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = grep -E
EXEEXT =
F77 = g77
FFLAGS = -g -O2
HAVE_CHECK_FALSE = #
HAVE_CHECK_TRUE =
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
LDFLAGS =
LIBOBJS =
LIBS = -lpthread
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/morph/lladd/missing --run makeinfo
OBJEXT = o
PACKAGE = hello
PACKAGE_BUGREPORT = sears@cs.berkeley.edu
PACKAGE_NAME = PACKAGE
PACKAGE_STRING = PACKAGE VERSION
PACKAGE_TARNAME = package
PACKAGE_VERSION = VERSION
PATH_SEPARATOR = :
RANLIB = ranlib
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
VERSION = 0.1
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_CXX = g++
ac_ct_F77 = g77
ac_ct_RANLIB = ranlib
ac_ct_STRIP = strip
am__fastdepCC_FALSE = #
am__fastdepCC_TRUE =
am__fastdepCXX_FALSE = #
am__fastdepCXX_TRUE =
am__include = include
am__leading_dot = .
am__quote =
bindir = ${exec_prefix}/bin
build = i686-pc-linux-gnu
build_alias =
build_cpu = i686
build_os = linux-gnu
build_vendor = pc
datadir = ${prefix}/share
exec_prefix = ${prefix}
host = i686-pc-linux-gnu
host_alias =
host_cpu = i686
host_os = linux-gnu
host_vendor = pc
includedir = ${prefix}/include
infodir = ${prefix}/info
install_sh = /home/morph/lladd/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
mandir = ${prefix}/man
mkdir_p = mkdir -p -- .
oldincludedir = /usr/include
prefix = /usr/local
program_transform_name = s,x,x,
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
sysconfdir = ${prefix}/etc
target_alias =
LDADD = $(top_builddir)/build/libdfa.a $(top_builddir)/build/lib2pc.a
SOURCES = cyrusdb_lladd.c
lib_LIBRARIES = libcyrusdb_lladd.a
libcyrusdb_lladd_a_SOURCES = cyrusdb_lladd.c
AM_CFLAGS = -g -Wall -pedantic
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/apps/cyrus/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/apps/cyrus/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-libLIBRARIES: $(lib_LIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
@list='$(lib_LIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
$(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
else :; fi; \
done
@$(POST_INSTALL)
@list='$(lib_LIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
p="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \
$(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \
else :; fi; \
done
uninstall-libLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LIBRARIES)'; for p in $$list; do \
p="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \
rm -f "$(DESTDIR)$(libdir)/$$p"; \
done
clean-libLIBRARIES:
-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
libcyrusdb_lladd.a: $(libcyrusdb_lladd_a_OBJECTS) $(libcyrusdb_lladd_a_DEPENDENCIES)
-rm -f libcyrusdb_lladd.a
$(libcyrusdb_lladd_a_AR) libcyrusdb_lladd.a $(libcyrusdb_lladd_a_OBJECTS) $(libcyrusdb_lladd_a_LIBADD)
$(RANLIB) libcyrusdb_lladd.a
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
include ./$(DEPDIR)/cyrusdb_lladd.Po
.c.o:
if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
# source='$<' object='$@' libtool=no \
# depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
# $(CCDEPMODE) $(depcomp) \
# $(COMPILE) -c $<
.c.obj:
if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
# source='$<' object='$@' libtool=no \
# depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
# $(CCDEPMODE) $(depcomp) \
# $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
# source='$<' object='$@' libtool=yes \
# depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' \
# $(CCDEPMODE) $(depcomp) \
# $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LIBRARIES)
installdirs:
for dir in "$(DESTDIR)$(libdir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am: install-libLIBRARIES
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-libLIBRARIES
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLIBRARIES clean-libtool ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am \
install-libLIBRARIES install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-info-am \
uninstall-libLIBRARIES
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -39,7 +39,7 @@ 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 <sys/types.h> /*#include <sys/types.h> */
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/poll.h> #include <sys/poll.h>
#include <netinet/in.h> #include <netinet/in.h>

View file

@ -3,6 +3,6 @@
lib_LIBRARIES=liblladd.a lib_LIBRARIES=liblladd.a
#liblladd_a_LIBADD=logger/liblogger.a operations/liboperations.a #liblladd_a_LIBADD=logger/liblogger.a operations/liboperations.a
# removed: recovery.c transactional.c logger.c logger/logparser.c logger/logstreamer.c # removed: recovery.c transactional.c logger.c logger/logparser.c logger/logstreamer.c
liblladd_a_SOURCES=common.c stats.c bufferManager.c linkedlist.c operations.c pageCache.c page.c blobManager.c recovery2.c transactional2.c logger/logEntry.c logger/logWriter.c logger/logHandle.c logger/logger2.c operations/decrement.c operations/increment.c operations/lladdhash.c operations/prepare.c operations/set.c operations/alloc.c liblladd_a_SOURCES=common.c stats.c bufferManager.c linkedlist.c operations.c pageCache.c page.c blobManager.c recovery2.c transactional2.c logger/logEntry.c logger/logWriter.c logger/logHandle.c logger/logger2.c operations/decrement.c operations/increment.c operations/prepare.c operations/set.c operations/alloc.c #operations/lladdhash.c
AM_CFLAGS= -g -Wall -pedantic -std=gnu99 AM_CFLAGS= -g -Wall -pedantic -std=gnu99

View file

@ -1,19 +1,16 @@
#include <unistd.h> #include <config.h>
#include <assert.h> #include <lladd/common.h>
#include <fcntl.h>
#include <stdlib.h> #include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <pbl/pbl.h>
#include <lladd/transactional.h> #include <lladd/transactional.h>
#include <lladd/bufferManager.h> #include <lladd/bufferManager.h>
#include <lladd/page.h>
#include <lladd/constants.h> #include <lladd/constants.h>
#include "blobManager.h" #include "blobManager.h"
#include <pbl/pbl.h>
#include <stdio.h>
static FILE * blobf0 = NULL, * blobf1 = NULL; static FILE * blobf0 = NULL, * blobf1 = NULL;
/** /**
@ -28,7 +25,8 @@ static pblHashTable_t * dirtyBlobs;
static void readRawRecord(int xid, recordid rid, void * buf, int size) { static void readRawRecord(int xid, recordid rid, void * buf, int size) {
recordid blob_rec_rid = rid; recordid blob_rec_rid = rid;
blob_rec_rid.size = size; blob_rec_rid.size = size;
readRecord(xid, blob_rec_rid, buf); /*readRecord(xid, blob_rec_rid, buf);*/
Tread(xid, blob_rec_rid, buf);
} }
static void writeRawRecord(int xid, recordid rid, const void * buf, int size) { static void writeRawRecord(int xid, recordid rid, const void * buf, int size) {
@ -41,31 +39,17 @@ static void writeRawRecord(int xid, recordid rid, const void * buf, int size) {
/* moved verbatim from bufferManger.c, then hacked up to use FILE * instead of ints. */ /* moved verbatim from bufferManger.c, then hacked up to use FILE * instead of ints. */
void openBlobStore() { void openBlobStore() {
int blobfd0, blobfd1;
/* the r+ mode opens an existing file read /write */
if( ! (blobf0 = fopen(BLOB0_FILE, "r+"))) { /* file may not exist */ if( ! (blobf0 = fopen(BLOB0_FILE, "r+"))) { /* file may not exist */
if( (blobfd0 = creat(BLOB0_FILE, 0666)) == -1 ) { /* cannot even create it */ /* the w+ mode truncates, creates, and opens read / write */
printf("ERROR: %i on %s line %d", errno, __FILE__, __LINE__); if(!(blobf0 = fopen(BLOB0_FILE, "w+"))) { perror("Couldn't open or create blob 0 file"); abort(); }
perror("Creating blob 0 file"); abort();
}
if( close(blobfd0)) {
printf("ERROR: %i on %s line %d", errno, __FILE__, __LINE__);
perror(NULL); abort();
}
if(!(blobf0 = fopen(BLOB0_FILE, "r+"))) { perror("Couldn't open or create blob 0 file"); abort(); }
} }
DEBUG("blobf0 opened.\n"); DEBUG("blobf0 opened.\n");
if( ! (blobf1 = fopen(BLOB1_FILE, "r+"))) { /* file may not exist */ if( ! (blobf1 = fopen(BLOB1_FILE, "r+"))) { /* file may not exist */
if( (blobfd1 = creat(BLOB1_FILE, 0666)) == -1 ) { /* cannot even create it */ if(!(blobf1 = fopen(BLOB1_FILE, "w+"))) { perror("Couldn't open or create blob 1 file"); abort(); }
printf("ERROR: %i on %s line %d", errno, __FILE__, __LINE__);
perror("Creating blob 1 file"); abort();
}
if( close(blobfd1)) {
printf("ERROR: %i on %s line %d", errno, __FILE__, __LINE__);
perror(NULL); abort();
}
if(!(blobf1 = fopen(BLOB1_FILE, "r+"))) { perror("Couldn't open or create blob 1 file"); abort(); }
} }
DEBUG("blobf1 opened.\n"); DEBUG("blobf1 opened.\n");
@ -102,14 +86,14 @@ long myFseek(FILE * f, long offset, int whence) {
return ret; return ret;
} }
recordid preAllocBlob(int xid, size_t blobSize) { recordid preAllocBlob(int xid, long blobSize) {
long fileSize = myFseek(blobf1, 0, SEEK_END); long fileSize = myFseek(blobf1, 0, SEEK_END);
blob_record_t blob_rec; blob_record_t blob_rec;
Page p; Page p;
/* char zero = 0; */ /* char zero = 0; */
/* Allocate space for the blob entry. */ /* Allocate space for the blob entry. */
DEBUG("Allocing blob (size %d)\n", blobSize); DEBUG("Allocing blob (size %ld)\n", blobSize);
assert(blobSize > 0); /* Don't support zero length blobs right now... */ assert(blobSize > 0); /* Don't support zero length blobs right now... */
@ -153,7 +137,7 @@ void allocBlob(int xid, lsn_t lsn, recordid rid) {
/* recordid rid = preAllocBlob(xid, blobSize); */ /* recordid rid = preAllocBlob(xid, blobSize); */
/* Allocate space for the blob entry. */ /* Allocate space for the blob entry. */
DEBUG("post Allocing blob (size %d)\n", rid.size); DEBUG("post Allocing blob (size %ld)\n", rid.size);
assert(rid.size > 0); /* Don't support zero length blobs right now... */ assert(rid.size > 0); /* Don't support zero length blobs right now... */
@ -280,7 +264,7 @@ void writeBlob(int xid, lsn_t lsn, recordid rid, const void * buf) {
FILE * fd; FILE * fd;
int readcount; int readcount;
DEBUG("Writing blob (size %d)\n", rid.size); DEBUG("Writing blob (size %ld)\n", rid.size);
/* Tread() raw record */ /* Tread() raw record */

View file

@ -72,7 +72,7 @@ typedef struct {
} blob_record_t; } blob_record_t;
recordid preAllocBlob(int xid, size_t blobsize); recordid preAllocBlob(int xid, long blobsize);
/** /**
Allocate a blob of size blobSize. Allocate a blob of size blobSize.

View file

@ -44,27 +44,16 @@ terms specified in this license.
* *
* implementation of the page buffer * implementation of the page buffer
* *************************************************/ * *************************************************/
#include <unistd.h>
#include <config.h>
#include <lladd/common.h>
#include <assert.h> #include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <pbl/pbl.h>
#include <lladd/bufferManager.h> #include <lladd/bufferManager.h>
#include <lladd/page.h>
#include <lladd/constants.h>
#include "blobManager.h" #include "blobManager.h"
#include <lladd/pageCache.h> #include <lladd/pageCache.h>
#include <lladd/logger/logWriter.h> #include <lladd/logger/logWriter.h>
static FILE * stable = NULL; static FILE * stable = NULL;
@ -131,27 +120,18 @@ void pageWrite(const Page * ret) {
} }
static void openPageFile() { static void openPageFile() {
int stable_fd;
DEBUG("Opening storefile.\n"); DEBUG("Opening storefile.\n");
if( ! (stable = fopen(STORE_FILE, "r+"))) { /* file may not exist */ if( ! (stable = fopen(STORE_FILE, "r+"))) { /* file may not exist */
byte* zero = calloc(1, PAGE_SIZE); byte* zero = calloc(1, PAGE_SIZE);
DEBUG("Creating new page storefile.\n"); if(!(stable = fopen(STORE_FILE, "w+"))) { perror("Couldn't open or create store file"); abort(); }
if( (stable_fd = creat(STORE_FILE, 0666)) == -1 ) { /* cannot even create it */
printf("ERROR: %i on %s line %d", errno, __FILE__, __LINE__);
perror("Creating store file"); abort();
}
if( close(stable_fd)) {
printf("ERROR: %i on %s line %d", errno, __FILE__, __LINE__);
perror(NULL); abort();
}
if(!(stable = fopen(STORE_FILE, "r+"))) { perror("Couldn't open or create store file"); abort(); }
/* Write out one page worth of zeros to get started. */ /* Write out one page worth of zeros to get started. */
if(1 != fwrite(zero, PAGE_SIZE, 1, stable)) { assert (0); } if(1 != fwrite(zero, PAGE_SIZE, 1, stable)) { assert (0); }
free(zero);
} }
lastFreepage = 0; lastFreepage = 0;
@ -273,7 +253,7 @@ Page loadPage (int pageid) {
Page * lastRallocPage = 0; Page * lastRallocPage = 0;
recordid ralloc(int xid, /*lsn_t lsn,*/ size_t size) { recordid ralloc(int xid, /*lsn_t lsn,*/ long size) {
recordid ret; recordid ret;
Page p; Page p;
@ -292,7 +272,7 @@ recordid ralloc(int xid, /*lsn_t lsn,*/ size_t size) {
ret = pageRalloc(p, size); ret = pageRalloc(p, size);
/* } */ /* } */
DEBUG("alloced rid = {%d, %d, %d}\n", ret.page, ret.slot, ret.size); DEBUG("alloced rid = {%d, %d, %ld}\n", ret.page, ret.slot, ret.size);
return ret; return ret;
} }
long readLSN(int pageid) { long readLSN(int pageid) {
@ -326,10 +306,10 @@ void writeRecord(int xid, lsn_t lsn, recordid rid, const void *dat) {
} }
void readRecord(int xid, recordid rid, void *buf) { void readRecord(int xid, recordid rid, void *buf) {
if(rid.size > BLOB_THRESHOLD_SIZE) { if(rid.size > BLOB_THRESHOLD_SIZE) {
DEBUG("Reading blob. xid = %d rid = { %d %d %d } buf = %x\n", xid, rid.page, rid.slot, rid.size, (unsigned int)buf); DEBUG("Reading blob. xid = %d rid = { %d %d %ld } buf = %x\n", xid, rid.page, rid.slot, rid.size, (unsigned int)buf);
readBlob(xid, rid, buf); readBlob(xid, rid, buf);
} else { } else {
DEBUG("Reading record xid = %d rid = { %d %d %d } buf = %x\n", xid, rid.page, rid.slot, rid.size, (unsigned int)buf); DEBUG("Reading record xid = %d rid = { %d %d %ld } buf = %x\n", xid, rid.page, rid.slot, rid.size, (unsigned int)buf);
pageReadRecord(xid, loadPage(rid.page), rid, buf); pageReadRecord(xid, loadPage(rid.page), rid, buf);
} }
} }

View file

@ -1,18 +1,14 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#include <config.h>
#include <lladd/common.h> #include <lladd/common.h>
#include "latches.h"
#include <pbl/pbl.h>
#include <errno.h> #include <errno.h>
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#undef pthread_mutex_t #undef pthread_mutex_t
#undef pthread_mutex_init #undef pthread_mutex_init
#undef pthread_mutex_destroy #undef pthread_mutex_destroy
#undef pthread_mutex_lock #undef pthread_mutex_lock
@ -42,9 +38,16 @@ int __lladd_pthread_mutex_lock(lladd_pthread_mutex_t *mutex, char * file, int li
char * location; char * location;
int location_length = asprintf(&location, "%s %d", file, line); int location_length = asprintf(&location, "%s %d", file, line);
/* DEBUG("Acquire mutex: %s %d\n", file, line);*/
while(EBUSY == (ret = pthread_mutex_trylock(&(mutex->mutex)))) { while(EBUSY == (ret = pthread_mutex_trylock(&(mutex->mutex)))) {
blockCount ++; blockCount ++;
pthread_yield(); pthread_yield();
if(blockCount > 10000) {
DEBUG("Spinning at %s:%d, %ld times\n", file, line, blockCount);
}
} }
@ -135,6 +138,9 @@ __profile_rwl *__profile_rw_initlock (char * file, int line) {
@todo For now, we only profile write locks... @todo For now, we only profile write locks...
*/ */
void __profile_readlock (__profile_rwl *lock, int d, char * file, int line) { void __profile_readlock (__profile_rwl *lock, int d, char * file, int line) {
/* DEBUG("Read lock: %s %d\n", file, line); */
readlock(lock->lock, d); readlock(lock->lock, d);
} }
@ -145,6 +151,9 @@ void __profile_writelock (__profile_rwl *lock, int d, char * file, int line) {
profile_tuple * tup; profile_tuple * tup;
/* DEBUG("Write lock: %s %d\n", file, line); */
/** @todo Should we spin instead of using the more efficient rwl /** @todo Should we spin instead of using the more efficient rwl
implementation, or should we see how many times we were woken implementation, or should we see how many times we were woken
before obtaining the lock? */ before obtaining the lock? */

74
src/lladd/latches.h Normal file
View file

@ -0,0 +1,74 @@
#include <config.h>
#include <lladd/common.h>
/** @todo threading should be moved into its own header file. */
#include <pthread.h>
/*#include <pbl/pbl.h> -- Don't want everything that touches threading to include pbl... */
#include <lladd/stats.h>
/**
A data structure for profiling latching behavior.
All time values recorded in this struct are in microseconds.
*/
typedef struct {
const char * file;
int line;
const char * name;
pthread_mutex_t mutex;
profile_tuple tup;
char * last_acquired_at;
/* pblHashTable_t * lockpoints; */
void * lockpoints;
} lladd_pthread_mutex_t;
#include <libdfa/rw.h>
/**
Keeps some profiling information along with a read/write lock.
*/
typedef struct {
const char * file;
int line;
rwl * lock;
profile_tuple tup;
char * last_acquired_at;
/* pblHashTable_t * lockpoints; */
void * lockpoints;
} __profile_rwl;
#ifdef PROFILE_LATCHES
#define pthread_mutex_t lladd_pthread_mutex_t
#define pthread_mutex_init(x, y) __lladd_pthread_mutex_init((x), (y), __FILE__, __LINE__, #x)
#define pthread_mutex_destroy(x) __lladd_pthread_mutex_destroy((x))
#define pthread_mutex_lock(x) __lladd_pthread_mutex_lock((x), __FILE__, __LINE__)
#define pthread_mutex_unlock(x) __lladd_pthread_mutex_unlock((x))
#define pthread_mutex_trylock(x) NO_PROFILING_EQUIVALENT_TO_PTHREAD_TRYLOCK
int __lladd_pthread_mutex_init(lladd_pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr, const char * file, int line, const char * mutex_name);
int __lladd_pthread_mutex_lock(lladd_pthread_mutex_t *mutex, char * file, int line);
int __lladd_pthread_mutex_unlock(lladd_pthread_mutex_t *mutex);
int __lladd_pthread_mutex_destroy(lladd_pthread_mutex_t *mutex);
#define initlock() __profile_rw_initlock(__FILE__, __LINE__)
#define readlock(x, y) __profile_readlock((x),(y), __FILE__, __LINE__)
#define writelock(x, y) __profile_writelock((x), (y), __FILE__, __LINE__)
#define readunlock(x) __profile_readunlock((x))
#define writeunlock(x) __profile_writeunlock((x))
#define deletelock(x) __profile_deletelock((x))
#define rwl __profile_rwl
rwl *__profile_rw_initlock (char * file, int line);
void __profile_readlock (rwl *lock, int d, char * file, int line);
void __profile_writelock (rwl *lock, int d, char * file, int line);
void __profile_readunlock (rwl *lock);
void __profile_writeunlock (rwl *lock);
void __profile_deletelock (rwl *lock);
#endif

View file

@ -44,12 +44,13 @@ terms specified in this license.
* *
* simple linked list * simple linked list
*****************************/ *****************************/
#include <config.h>
#include <stdlib.h> #include <lladd/common.h>
#include <stdio.h>
#include "linkedlist.h" #include "linkedlist.h"
#include <stdio.h>
#ifndef NULL #ifndef NULL
#define NULL 0 #define NULL 0
#endif #endif

View file

@ -39,13 +39,14 @@ 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 <lladd/common.h>
#include <lladd/logger/logEntry.h> #include <lladd/logger/logEntry.h>
#include <assert.h> #include <assert.h>
#include <lladd/operations.h> #include <lladd/operations.h>
#include <config.h>
#include <malloc.h>
#include <string.h>
LogEntry * allocCommonLogEntry(lsn_t prevLSN, int xid, unsigned int type) { LogEntry * allocCommonLogEntry(lsn_t prevLSN, int xid, unsigned int type) {
LogEntry * ret = malloc(sizeof(struct __raw_log_entry)); LogEntry * ret = malloc(sizeof(struct __raw_log_entry));
@ -116,7 +117,7 @@ LogEntry * allocCLRLogEntry (lsn_t prevLSN, int xid,
size_t sizeofLogEntry(const LogEntry * log) { long sizeofLogEntry(const LogEntry * log) {
switch (log->type) { switch (log->type) {
case CLRLOG: case CLRLOG:
return sizeof(struct __raw_log_entry) + sizeof(CLRLogEntry); return sizeof(struct __raw_log_entry) + sizeof(CLRLogEntry);

View file

@ -39,15 +39,16 @@ 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 <lladd/common.h>
#include <lladd/logger/logWriter.h> #include <lladd/logger/logWriter.h>
#include <lladd/logger/logHandle.h> #include <lladd/logger/logHandle.h>
#include <assert.h>
#include <config.h>
#include <stdlib.h>
#include <malloc.h>
#include <unistd.h>
#include <libdfa/rw.h>
#include "../latches.h"
#include <assert.h>
#include <stdio.h>
/** /**
@todo Should the log file be global? @todo Should the log file be global?
*/ */
@ -91,7 +92,16 @@ static lsn_t global_offset;
if it needs the file position to be preserved across calls. (For if it needs the file position to be preserved across calls. (For
example, when using fseek(); myFseek() does this, but only example, when using fseek(); myFseek() does this, but only
internally, so if it is used to position the stream, it should be internally, so if it is used to position the stream, it should be
guarded with flockfile(). guarded with flockfile(). Unfortunately, it appears as though we
cannot use flockfile() on some systems, because this sequence does
not behave correctly:
flockfile(foo);
fclose(foo);
fopen(foo);
funlockfile(foo);
Oh well.
*/ */
static rwl * log_read_lock; static rwl * log_read_lock;
@ -109,10 +119,11 @@ pthread_mutex_t log_write_mutex;
pthread_mutex_t truncateLog_mutex; pthread_mutex_t truncateLog_mutex;
/** /**
@todo Put myFseek, myFwrite in their own file, and make a header for it... */ @todo Put myFseek, myFwrite in their own file, and make a header for it... */
void myFwrite(const void * dat, size_t size, FILE * f); void myFwrite(const void * dat, long size, FILE * f);
long myFseek(FILE * f, long offset, int whence); long myFseek(FILE * f, long offset, int whence);
int openLogWriter() { int openLogWriter() {
log = fopen(LOG_FILE, "a+"); log = fopen(LOG_FILE, "a+");
@ -190,7 +201,7 @@ int openLogWriter() {
*/ */
int writeLogEntry(LogEntry * e) { int writeLogEntry(LogEntry * e) {
int nmemb; int nmemb;
const size_t size = sizeofLogEntry(e); const long size = sizeofLogEntry(e);
if(e->xid == -1) { /* Don't write log entries for recovery xacts. */ if(e->xid == -1) { /* Don't write log entries for recovery xacts. */
@ -212,11 +223,13 @@ int writeLogEntry(LogEntry * e) {
lh = getLSNHandle(nextAvailableLSN); lh = getLSNHandle(nextAvailableLSN);
while((le = nextInLog(&lh))) { while((le = nextInLog(&lh))) {
nextAvailableLSN = le->LSN + sizeofLogEntry(le) + sizeof(size_t);; nextAvailableLSN = le->LSN + sizeofLogEntry(le) + sizeof(long);;
free(le); free(le);
} }
} }
writelock(log_read_lock, 100);
/* Set the log entry's LSN. */ /* Set the log entry's LSN. */
#ifdef DEBUGGING #ifdef DEBUGGING
@ -229,14 +242,15 @@ int writeLogEntry(LogEntry * e) {
e->LSN = nextAvailableLSN; e->LSN = nextAvailableLSN;
flockfile(log); /* Prevent other threads from calling fseek... */ /* We have the write lock, so no-one else can call fseek behind our back. */
/* flockfile(log); */ /* Prevent other threads from calling fseek... */
fseek(log, nextAvailableLSN - global_offset, SEEK_SET); fseek(log, nextAvailableLSN - global_offset, SEEK_SET);
nextAvailableLSN += (size + sizeof(size_t)); nextAvailableLSN += (size + sizeof(long));
/* Print out the size of this log entry. (not including this item.) */ /* Print out the size of this log entry. (not including this item.) */
nmemb = fwrite(&size, sizeof(size_t), 1, log); nmemb = fwrite(&size, sizeof(long), 1, log);
if(nmemb != 1) { if(nmemb != 1) {
perror("writeLog couldn't write next log entry size!"); perror("writeLog couldn't write next log entry size!");
@ -252,9 +266,10 @@ int writeLogEntry(LogEntry * e) {
return FILE_WRITE_ERROR; return FILE_WRITE_ERROR;
} }
funlockfile(log); /* funlockfile(log); */
pthread_mutex_unlock(&log_write_mutex); pthread_mutex_unlock(&log_write_mutex);
writeunlock(log_read_lock);
/* We're done. */ /* We're done. */
return 0; return 0;
@ -311,7 +326,7 @@ void deleteLogWriter() {
static LogEntry * readLogEntry() { static LogEntry * readLogEntry() {
LogEntry * ret = NULL; LogEntry * ret = NULL;
size_t size, entrySize; long size, entrySize;
int nmemb; int nmemb;
@ -319,7 +334,7 @@ static LogEntry * readLogEntry() {
return NULL; return NULL;
} }
nmemb = fread(&size, sizeof(size_t), 1, log); nmemb = fread(&size, sizeof(long), 1, log);
if(nmemb != 1) { if(nmemb != 1) {
if(feof(log)) { if(feof(log)) {
@ -377,11 +392,15 @@ LogEntry * readLSNEntry(lsn_t LSN) {
/* readlock(log_read_lock); */ /* readlock(log_read_lock); */
/* Irritating overhead; two mutex acquires to do a read. */
readlock(log_read_lock, 200);
flockfile(log); flockfile(log);
fseek(log, LSN - global_offset, SEEK_SET); fseek(log, LSN - global_offset, SEEK_SET);
ret = readLogEntry(); ret = readLogEntry();
funlockfile(log); funlockfile(log);
/* readunlock(log_read_lock); */
readunlock(log_read_lock);
return ret; return ret;
@ -397,7 +416,7 @@ int truncateLog(lsn_t LSN) {
long size; long size;
int count; /* int count; */
pthread_mutex_lock(&truncateLog_mutex); pthread_mutex_lock(&truncateLog_mutex);
@ -436,6 +455,7 @@ int truncateLog(lsn_t LSN) {
lh = getLSNHandle(LSN); lh = getLSNHandle(LSN);
while((le = nextInLog(&lh))) { while((le = nextInLog(&lh))) {
size = sizeofLogEntry(le); size = sizeofLogEntry(le);
myFwrite(&size, sizeof(lsn_t), tmpLog); myFwrite(&size, sizeof(lsn_t), tmpLog);
@ -443,6 +463,8 @@ int truncateLog(lsn_t LSN) {
free (le); free (le);
} }
writelock(log_read_lock, 300);
fflush(tmpLog); fflush(tmpLog);
#ifdef HAVE_FDATASYNC #ifdef HAVE_FDATASYNC
fdatasync(fileno(tmpLog)); fdatasync(fileno(tmpLog));
@ -452,7 +474,7 @@ int truncateLog(lsn_t LSN) {
/** Time to shut out the readers */ /** Time to shut out the readers */
flockfile(log); /* flockfile(log); --- Don't need this; we hold the writelock. */
fclose(log); /* closeLogWriter calls sync, but we don't need to. :) */ fclose(log); /* closeLogWriter calls sync, but we don't need to. :) */
fclose(tmpLog); fclose(tmpLog);
@ -470,12 +492,14 @@ int truncateLog(lsn_t LSN) {
return FILE_WRITE_OPEN_ERROR; return FILE_WRITE_OPEN_ERROR;
} }
myFseek(log, 0, SEEK_SET); /* myFseek(log, 0, SEEK_SET); */
count = fread(&global_offset, sizeof(lsn_t), 1, log); global_offset = LSN - sizeof(lsn_t); /*= fread(&global_offset, sizeof(lsn_t), 1, log);*/
assert(count == 1); /*assert(count == 1); */
funlockfile(log); /* funlockfile(log); */
writeunlock(log_read_lock);
pthread_mutex_unlock(&log_write_mutex); pthread_mutex_unlock(&log_write_mutex);
pthread_mutex_unlock(&truncateLog_mutex); pthread_mutex_unlock(&truncateLog_mutex);
return 0; return 0;
@ -486,7 +510,7 @@ lsn_t firstLogEntry() {
return global_offset + sizeof(lsn_t); return global_offset + sizeof(lsn_t);
} }
void myFwrite(const void * dat, size_t size, FILE * f) { void myFwrite(const void * dat, long size, FILE * f) {
int nmemb = fwrite(dat, size, 1, f); int nmemb = fwrite(dat, size, 1, f);
/* test */ /* test */
if(nmemb != 1) { if(nmemb != 1) {

View file

@ -40,13 +40,13 @@ permission to use and distribute the software in accordance with the
terms specified in this license. terms specified in this license.
---*/ ---*/
#include <lladd/bufferManager.h> #include <config.h>
#include <lladd/common.h>
#include <lladd/logger/logger2.h> #include <lladd/logger/logger2.h>
#include <lladd/logger/logWriter.h> #include <lladd/logger/logWriter.h>
#include <malloc.h> #include <lladd/bufferManager.h>
#include <stdio.h>
#include <stdlib.h>
TransactionLog LogTransBegin(int xid) { TransactionLog LogTransBegin(int xid) {
TransactionLog tl; TransactionLog tl;
tl.xid = xid; tl.xid = xid;
@ -83,7 +83,7 @@ lsn_t LogTransAbort(TransactionLog * l) {
LogEntry * LogUpdate(TransactionLog * l, recordid rid, int operation, const byte * args) { LogEntry * LogUpdate(TransactionLog * l, recordid rid, int operation, const byte * args) {
void * preImage = NULL; void * preImage = NULL;
size_t argSize = 0; long argSize = 0;
LogEntry * e; LogEntry * e;
if(operationsTable[operation].sizeofData == SIZEOF_RECORD) { if(operationsTable[operation].sizeofData == SIZEOF_RECORD) {
@ -93,7 +93,7 @@ LogEntry * LogUpdate(TransactionLog * l, recordid rid, int operation, const byte
} }
if(operationsTable[operation].undo == NO_INVERSE) { if(operationsTable[operation].undo == NO_INVERSE) {
DEBUG("Creating %d byte physical pre-image.\n", rid.size); DEBUG("Creating %ld byte physical pre-image.\n", rid.size);
preImage = malloc(rid.size); preImage = malloc(rid.size);
if(!preImage) { perror("malloc"); abort(); } if(!preImage) { perror("malloc"); abort(); }
readRecord(l->xid, rid, preImage); readRecord(l->xid, rid, preImage);

View file

@ -45,6 +45,8 @@ terms specified in this license.
#include <lladd/bufferManager.h> #include <lladd/bufferManager.h>
#include <assert.h> #include <assert.h>
#include <stdio.h>
Operation operationsTable[MAX_OPERATIONS]; Operation operationsTable[MAX_OPERATIONS];
void doUpdate(const LogEntry * e) { void doUpdate(const LogEntry * e) {
@ -61,10 +63,10 @@ void redoUpdate(const LogEntry * e) {
recordid rid = e->contents.update.rid; recordid rid = e->contents.update.rid;
#endif #endif
if(e->LSN > pageLSN) { if(e->LSN > pageLSN) {
DEBUG("OPERATION Redo, %ld > %ld {%d %d %d}\n", e->LSN, pageLSN, rid.page, rid.slot, rid.size); DEBUG("OPERATION Redo, %ld > %ld {%d %d %ld}\n", e->LSN, pageLSN, rid.page, rid.slot, rid.size);
doUpdate(e); doUpdate(e);
} else { } else {
DEBUG("OPERATION Skipping redo, %ld <= %ld {%d %d %d}\n", e->LSN, pageLSN, rid.page, rid.slot, rid.size); DEBUG("OPERATION Skipping redo, %ld <= %ld {%d %d %ld}\n", e->LSN, pageLSN, rid.page, rid.slot, rid.size);
} }
} else if(e->type == CLRLOG) { } else if(e->type == CLRLOG) {
LogEntry * f = readLSNEntry(e->contents.clr.thisUpdateLSN); LogEntry * f = readLSNEntry(e->contents.clr.thisUpdateLSN);
@ -75,10 +77,10 @@ void redoUpdate(const LogEntry * e) {
doesn't, then undo the original operation. */ doesn't, then undo the original operation. */
if(f->LSN > readLSN(e->contents.update.rid.page)) { if(f->LSN > readLSN(e->contents.update.rid.page)) {
DEBUG("OPERATION Undoing for clr, %ld {%d %d %d}\n", f->LSN, rid.page, rid.slot, rid.size); DEBUG("OPERATION Undoing for clr, %ld {%d %d %ld}\n", f->LSN, rid.page, rid.slot, rid.size);
undoUpdate(f, e->LSN); undoUpdate(f, e->LSN);
} else { } else {
DEBUG("OPERATION Skiping undo for clr, %ld {%d %d %d}\n", f->LSN, rid.page, rid.slot, rid.size); DEBUG("OPERATION Skiping undo for clr, %ld {%d %d %ld}\n", f->LSN, rid.page, rid.slot, rid.size);
} }
} else { } else {
assert(0); assert(0);
@ -102,16 +104,16 @@ void undoUpdate(const LogEntry * e, lsn_t clr_lsn) {
if(undo == NO_INVERSE) { if(undo == NO_INVERSE) {
/* Physical undo */ /* Physical undo */
DEBUG("OPERATION Physical undo, %ld {%d %d %d}\n", e->LSN, rid.page, rid.slot, rid.size); DEBUG("OPERATION Physical undo, %ld {%d %d %ld}\n", e->LSN, rid.page, rid.slot, rid.size);
writeRecord(e->xid, clr_lsn, e->contents.update.rid, getUpdatePreImage(e)); writeRecord(e->xid, clr_lsn, e->contents.update.rid, getUpdatePreImage(e));
} else { } else {
/* @see doUpdate() */ /* @see doUpdate() */
/* printf("Logical undo"); fflush(NULL); */ /* printf("Logical undo"); fflush(NULL); */
DEBUG("OPERATION Logical undo, %ld {%d %d %d}\n", e->LSN, rid.page, rid.slot, rid.size); DEBUG("OPERATION Logical undo, %ld {%d %d %ld}\n", e->LSN, rid.page, rid.slot, rid.size);
operationsTable[undo].run(e->xid, clr_lsn, e->contents.update.rid, getUpdateArgs(e)); operationsTable[undo].run(e->xid, clr_lsn, e->contents.update.rid, getUpdateArgs(e));
} }
} else { } else {
DEBUG("OPERATION Skipping undo, %ld {%d %d %d}\n", e->LSN, rid.page, rid.slot, rid.size); DEBUG("OPERATION Skipping undo, %ld {%d %d %ld}\n", e->LSN, rid.page, rid.slot, rid.size);
} }
/* printf("Undo done."); fflush(NULL); */ /* printf("Undo done."); fflush(NULL); */

View file

@ -1,4 +1,9 @@
#include <config.h>
#include <lladd/common.h>
#include <lladd/operations/alloc.h> #include <lladd/operations/alloc.h>
#include <lladd/transactional.h>
#include <lladd/page.h> #include <lladd/page.h>
#include <lladd/bufferManager.h> #include <lladd/bufferManager.h>
#include "../blobManager.h" #include "../blobManager.h"
@ -50,7 +55,7 @@ Operation getAlloc() {
} }
recordid Talloc(int xid, size_t size) { recordid Talloc(int xid, long size) {
recordid rid; recordid rid;
if(size >= BLOB_THRESHOLD_SIZE) { if(size >= BLOB_THRESHOLD_SIZE) {

View file

@ -1,13 +1,12 @@
#include <config.h>
#include <lladd/common.h>
#include <lladd/operations/lladdhash.h> #include <lladd/operations/lladdhash.h>
#include <lladd/bufferManager.h>
#include <lladd/transactional.h>
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
#include <memory.h>
#include <stdlib.h>
#include <lladd/transactional.h>
static const recordid ZERO_RECORDID = {0,0,0}; static const recordid ZERO_RECORDID = {0,0,0};
typedef struct { typedef struct {
@ -190,7 +189,7 @@ int _lHtInsert(int xid, recordid garbage, lladdHashRec_t * arg) {
return 0; return 0;
} }
/**Todo: ht->iterData is global to the hash table... seems like a bad idea! */ /**Todo: ht->iterData is global to the hash table... seems like a bad idea! */
int lHtPosition( int xid, lladdHash_t *ht, const void *key, size_t key_length ) { int lHtPosition( int xid, lladdHash_t *ht, const void *key, int key_length ) {
int index = hash(key, key_length, ht->size); int index = hash(key, key_length, ht->size);
recordid rid = _getHashMap(xid, ht)[index]; recordid rid = _getHashMap(xid, ht)[index];
@ -221,7 +220,7 @@ int lHtPosition( int xid, lladdHash_t *ht, const void *key, size_t key_length )
} }
} }
int lHtLookup( int xid, lladdHash_t *ht, const void *key, size_t keylen, void *buf ) { int lHtLookup( int xid, lladdHash_t *ht, const void *key, int keylen, void *buf ) {
int index = hash(key, keylen, ht->size); int index = hash(key, keylen, ht->size);
recordid rid = _getHashMap(xid, ht)[index]; recordid rid = _getHashMap(xid, ht)[index];
@ -378,7 +377,7 @@ int lHtDelete(int xid, lladdHash_t *ht) {
} }
int lHtInsert(int xid, lladdHash_t *ht, const void *key, size_t keylen, void *dat, size_t datlen) { int lHtInsert(int xid, lladdHash_t *ht, const void *key, int keylen, void *dat, long datlen) {
recordid rid; recordid rid;
void * log_r; void * log_r;
lladdHashRec_t lir; lladdHashRec_t lir;
@ -401,7 +400,7 @@ int lHtInsert(int xid, lladdHash_t *ht, const void *key, size_t keylen, void *da
return 0; return 0;
} }
int lHtRemove( int xid, lladdHash_t *ht, const void *key, size_t keylen, void *buf, size_t buflen ) { int lHtRemove( int xid, lladdHash_t *ht, const void *key, int keylen, void *buf, long buflen ) {
recordid rid; recordid rid;
void * log_r; void * log_r;

View file

@ -45,22 +45,14 @@ terms specified in this license.
* implementation of pages * implementation of pages
************************************************/ ************************************************/
#include <assert.h> #include <config.h>
#include <errno.h> #include <lladd/common.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <lladd/bufferManager.h>
#include <lladd/constants.h>
/*#include "linkedlist.h"*/
#include <lladd/page.h> #include <lladd/page.h>
#include <pbl/pbl.h>
#include <assert.h>
#include <stdio.h>
#include <lladd/constants.h>
/* TODO: Combine with buffer size... */ /* TODO: Combine with buffer size... */
static int nextPage = 0; static int nextPage = 0;
@ -243,7 +235,7 @@ void pageWriteLSN(Page page) {
* in the page, minus the size of a new slot entry.) This is either exact, * in the page, minus the size of a new slot entry.) This is either exact,
* or an underestimate. * or an underestimate.
*/ */
size_t freespace(Page page) { int freespace(Page page) {
int space = (slotMemAddr(page.memAddr, readNumSlots(page.memAddr)) - (page.memAddr + readFreeSpace(page.memAddr))); int space = (slotMemAddr(page.memAddr, readNumSlots(page.memAddr)) - (page.memAddr + readFreeSpace(page.memAddr)));
return (space < 0) ? 0 : space; return (space < 0) ? 0 : space;
} }
@ -284,22 +276,7 @@ static void writeNumSlots(byte *memAddr, int numSlots) {
setFirstHalfOfWord((int*)(unsigned int*)(memAddr + START_OF_NUMSLOTS), numSlots); setFirstHalfOfWord((int*)(unsigned int*)(memAddr + START_OF_NUMSLOTS), numSlots);
} }
/** recordid pageRalloc(Page page, int size) {
* pageRalloc() assumes that the page is already loaded in memory. It takes
* as parameters a Page and the size in bytes of the new record. pageRalloc()
* returns a recordid representing the newly allocated record.
*
* NOTE: might want to pad records to be multiple of words in length, or, simply
* make sure all records start word aligned, but not necessarily having
* a length that is a multiple of words. (Since Tread(), Twrite() ultimately
* call memcpy(), this shouldn't be an issue)
*
* NOTE: pageRalloc() assumes that the caller already made sure that sufficient
* amount of freespace exists in this page. (@see freespace())
*
* @todo Makes no attempt to reuse old recordid's.
*/
recordid pageRalloc(Page page, size_t size) {
int freeSpace = readFreeSpace(page.memAddr); int freeSpace = readFreeSpace(page.memAddr);
int numSlots = readNumSlots(page.memAddr); int numSlots = readNumSlots(page.memAddr);
recordid rid; recordid rid;

View file

@ -5,14 +5,15 @@
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 <lladd/common.h>
#include <lladd/pageCache.h> #include <lladd/pageCache.h>
#include <lladd/bufferManager.h>
#include <assert.h> #include <assert.h>
#include <pbl/pbl.h> #include <pbl/pbl.h>
#include <lladd/constants.h>
#include <lladd/page.h>
#include <stdlib.h>
#include <lladd/bufferManager.h> #include <stdio.h>
static pblHashTable_t *activePages; /* page lookup */ static pblHashTable_t *activePages; /* page lookup */
static unsigned int bufferSize; /* < MAX_BUFFER_SIZE */ static unsigned int bufferSize; /* < MAX_BUFFER_SIZE */

View file

@ -8,16 +8,23 @@
*/ */
#include <config.h>
#include <lladd/common.h>
#include <lladd/recovery.h>
#include <pbl/pbl.h> #include <pbl/pbl.h>
#include "linkedlist.h" #include "linkedlist.h"
#include <lladd/logger/logger2.h>
#include <lladd/logger/logHandle.h> #include <lladd/logger/logHandle.h>
#include <lladd/common.h> #include <lladd/logger/logWriter.h>
#include <lladd/bufferManager.h> #include <lladd/bufferManager.h>
#include <malloc.h> #include <lladd/transactional.h>
#include <stdio.h>
#include <assert.h> #include <assert.h>
/** @todo This include is an artifact of our lack of infrastructure to support log iterator guards. */ /** @todo This include is an artifact of our lack of infrastructure to support log iterator guards. */
#include <lladd/operations/prepare.h> #include <lladd/operations/prepare.h>

View file

@ -1,4 +1,6 @@
#include <config.h>
#include <lladd/common.h> #include <lladd/common.h>
#include "latches.h"
#include <math.h> #include <math.h>

View file

@ -1,12 +1,15 @@
#include <config.h>
#include <lladd/common.h>
#include <lladd/transactional.h> #include <lladd/transactional.h>
#include <lladd/constants.h>
#include <lladd/logger/logger2.h>
#include <lladd/bufferManager.h>
#include <lladd/recovery.h> #include <lladd/recovery.h>
#include <string.h>
#include <assert.h>
#include <lladd/logger/logWriter.h> #include <lladd/logger/logWriter.h>
#include <lladd/logger/logHandle.h> #include <lladd/bufferManager.h>
#include <lladd/logger/logger2.h>
#include <stdio.h>
#include <assert.h>
TransactionLog XactionTable[MAX_TRANSACTIONS]; TransactionLog XactionTable[MAX_TRANSACTIONS];
int numActiveXactions = 0; int numActiveXactions = 0;
@ -21,8 +24,8 @@ void setupOperationsTable() {
operationsTable[OPERATION_INCREMENT] = getIncrement(); operationsTable[OPERATION_INCREMENT] = getIncrement();
operationsTable[OPERATION_DECREMENT] = getDecrement(); operationsTable[OPERATION_DECREMENT] = getDecrement();
operationsTable[OPERATION_PREPARE] = getPrepare(); operationsTable[OPERATION_PREPARE] = getPrepare();
operationsTable[OPERATION_LHINSERT] = getLHInsert(); /* operationsTable[OPERATION_LHINSERT] = getLHInsert();
operationsTable[OPERATION_LHREMOVE] = getLHRemove(); operationsTable[OPERATION_LHREMOVE] = getLHRemove(); */
operationsTable[OPERATION_ALLOC] = getAlloc(); operationsTable[OPERATION_ALLOC] = getAlloc();
operationsTable[OPERATION_DEALLOC] = getDealloc(); operationsTable[OPERATION_DEALLOC] = getDealloc();

View file

@ -1,4 +1,4 @@
LDADD=$(top_builddir)/src/2pc/lib2pc.a $(top_builddir)/src/libdfa/libdfa.a \ LDADD=$(top_builddir)/src/2pc/lib2pc.a $(top_builddir)/src/libdfa/libdfa.a \
$(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a $(top_builddir)/src/libdfa/librw.a -lm $(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a $(top_builddir)/src/libdfa/librw.a
bin_PROGRAMS=always_commit bin_PROGRAMS=always_commit
AM_CFLAGS= -g -Wall -pedantic -std=gnu99 AM_CFLAGS= -g -Wall -pedantic -std=gnu99

View file

@ -1,3 +1,5 @@
#include <stdio.h>
void setup (void) { void setup (void) {
remove("logfile.txt"); remove("logfile.txt");
remove("storefile.txt"); remove("storefile.txt");

View file

@ -51,6 +51,6 @@ int main() {
srunner_run_all(sr, CK_NORMAL); srunner_run_all(sr, CK_NORMAL);
nf = srunner_ntests_failed(sr); nf = srunner_ntests_failed(sr);
srunner_free(sr); srunner_free(sr);
suite_free(s); /* suite_free(s); */
return (nf == 0) ? 0 : 1; return (nf == 0) ? 0 : 1;
} }

View file

@ -1,4 +1,4 @@
LDADD=$(top_builddir)/src/apps/cht/libcht.a $(top_builddir)/src/2pc/lib2pc.a $(top_builddir)/src/libdfa/libdfa.a \ LDADD=$(top_builddir)/src/apps/cht/libcht.a $(top_builddir)/src/2pc/lib2pc.a $(top_builddir)/src/libdfa/libdfa.a \
$(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a $(top_builddir)/src/libdfa/librw.a -lm $(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a $(top_builddir)/src/libdfa/librw.a
bin_PROGRAMS=simple cht_server bin_PROGRAMS=simple cht_server
AM_CFLAGS= -g -Wall -pedantic -std=c99 AM_CFLAGS= -g -Wall -pedantic -std=c99

View file

@ -39,10 +39,11 @@ 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 <string.h>
#include "../../src/apps/cht/cht.h" #include "../../src/apps/cht/cht.h"
#include <assert.h> #include <assert.h>
#include <string.h>
/** Thanks, jbhtsimple.c!! */ /** Thanks, jbhtsimple.c!! */

View file

@ -1,3 +1,3 @@
LDADD=$(top_builddir)/src/libdfa/libdfa.a $(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a -lm $(top_builddir)/src/libdfa/librw.a LDADD=$(top_builddir)/src/libdfa/libdfa.a $(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a $(top_builddir)/src/libdfa/librw.a
bin_PROGRAMS=ping_pong_dfa fork_bomb star bin_PROGRAMS=ping_pong_dfa fork_bomb star
AM_FLAGS= -g -Wall -pedantic -std=c99 AM_FLAGS= -g -Wall -pedantic -std=c99

View file

@ -1,309 +0,0 @@
# Makefile.in generated by automake 1.8.5 from Makefile.am.
# test/lladd-old/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
srcdir = .
top_srcdir = ../..
pkgdatadir = $(datadir)/hello
pkglibdir = $(libdir)/hello
pkgincludedir = $(includedir)/hello
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = /usr/bin/install -c
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_triplet = i686-pc-linux-gnu
subdir = test/lladd-old
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /home/morph/lladd/missing --run aclocal-1.8
AMDEP_FALSE = #
AMDEP_TRUE =
AMTAR = ${SHELL} /home/morph/lladd/missing --run tar
AR = ar
AUTOCONF = ${SHELL} /home/morph/lladd/missing --run autoconf
AUTOHEADER = ${SHELL} /home/morph/lladd/missing --run autoheader
AUTOMAKE = ${SHELL} /home/morph/lladd/missing --run automake-1.8
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CHECK_CFLAGS =
CHECK_LIBS = -lcheck
CPP = gcc -E
CPPFLAGS =
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -g -O2
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO = echo
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = grep -E
EXEEXT =
F77 = g77
FFLAGS = -g -O2
HAVE_CHECK_FALSE = #
HAVE_CHECK_TRUE =
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
LDFLAGS =
LIBOBJS =
LIBS = -lpthread
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/morph/lladd/missing --run makeinfo
OBJEXT = o
PACKAGE = hello
PACKAGE_BUGREPORT = sears@cs.berkeley.edu
PACKAGE_NAME = PACKAGE
PACKAGE_STRING = PACKAGE VERSION
PACKAGE_TARNAME = package
PACKAGE_VERSION = VERSION
PATH_SEPARATOR = :
RANLIB = ranlib
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
VERSION = 0.1
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_CXX = g++
ac_ct_F77 = g77
ac_ct_RANLIB = ranlib
ac_ct_STRIP = strip
am__fastdepCC_FALSE = #
am__fastdepCC_TRUE =
am__fastdepCXX_FALSE = #
am__fastdepCXX_TRUE =
am__include = include
am__leading_dot = .
am__quote =
bindir = ${exec_prefix}/bin
build = i686-pc-linux-gnu
build_alias =
build_cpu = i686
build_os = linux-gnu
build_vendor = pc
datadir = ${prefix}/share
exec_prefix = ${prefix}
host = i686-pc-linux-gnu
host_alias =
host_cpu = i686
host_os = linux-gnu
host_vendor = pc
includedir = ${prefix}/include
infodir = ${prefix}/info
install_sh = /home/morph/lladd/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
mandir = ${prefix}/man
mkdir_p = mkdir -p -- .
oldincludedir = /usr/include
prefix = /usr/local
program_transform_name = s,x,x,
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
sysconfdir = ${prefix}/etc
target_alias =
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/lladd-old/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu test/lladd-old/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -6,6 +6,6 @@ else
TESTS = TESTS =
endif endif
noinst_PROGRAMS = $(TESTS) noinst_PROGRAMS = $(TESTS)
LDADD = @CHECK_LIBS@ $(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a $(top_builddir)/src/libdfa/librw.a -lpthread -lm -lefence LDADD = @CHECK_LIBS@ $(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a $(top_builddir)/src/libdfa/librw.a #-lefence
CLEANFILES = check_lht.log check_logEntry.log storefile.txt logfile.txt blob0_file.txt blob1_file.txt check_blobRecovery.log check_logWriter.log check_operations.log check_recovery.log check_transactional2.log CLEANFILES = check_lht.log check_logEntry.log storefile.txt logfile.txt blob0_file.txt blob1_file.txt check_blobRecovery.log check_logWriter.log check_operations.log check_recovery.log check_transactional2.log
AM_CFLAGS= -g -Wall -pedantic -std=gnu99 AM_CFLAGS= -g -Wall -pedantic -std=gnu99

View file

@ -48,7 +48,8 @@ terms specified in this license.
#include <lladd/logger/logWriter.h> #include <lladd/logger/logWriter.h>
#include <lladd/transactional.h> #include <lladd/transactional.h>
#include <pthread.h> #include "../../src/lladd/latches.h"
#include <sched.h>
#include <assert.h> #include <assert.h>
#include "../check_includes.h" #include "../check_includes.h"
@ -68,7 +69,7 @@ static void setup_log() {
LogEntry * f; LogEntry * f;
recordid rid; recordid rid;
byte * args = (byte*)"Test 123."; byte * args = (byte*)"Test 123.";
size_t args_size = 10; /* Including null */ long args_size = 10; /* Including null */
unsigned long preImage = 42; unsigned long preImage = 42;
rid.page = 0; rid.page = 0;
@ -289,7 +290,8 @@ static void* worker_thread(void * arg) {
/* fail_unless(1, NULL); */ /* fail_unless(1, NULL); */
/* Try to interleave requests as much as possible */ /* Try to interleave requests as much as possible */
pthread_yield(); /*pthread_yield(); */
sched_yield();
} }

View file

@ -1,4 +1,4 @@
LDADD=$(top_builddir)/src/libdfa/libdfa.a $(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a $(top_builddir)/src/libdfa/librw.a -lm LDADD=$(top_builddir)/src/libdfa/libdfa.a $(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a $(top_builddir)/src/libdfa/librw.a
bin_PROGRAMS=bit_arithmetic binary_search soundness bin_PROGRAMS=bit_arithmetic binary_search soundness
soundness_SOURCES = soundness.c soundness_SOURCES = soundness.c
AM_CFLAGS= -g -Wall -pedantic -std=c99 AM_CFLAGS= -g -Wall -pedantic -std=c99

View file

@ -1,5 +1,5 @@
LDADD=$(top_builddir)/src/2pc/lib2pc.a $(top_builddir)/src/libdfa/libdfa.a \ LDADD=$(top_builddir)/src/2pc/lib2pc.a $(top_builddir)/src/libdfa/libdfa.a \
$(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a \ $(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a \
$(top_builddir)/src/libdfa/librw.a -lpthread -lm $(top_builddir)/src/libdfa/librw.a
bin_PROGRAMS=logfile_dump bin_PROGRAMS=logfile_dump
AM_CFLAGS= -g -Wall -pedantic -std=gnu99 AM_CFLAGS= -g -Wall -pedantic -std=gnu99

View file

@ -13,7 +13,7 @@ static char * logEntryToString(LogEntry * le) {
case UPDATELOG: case UPDATELOG:
{ {
recordid rid = le->contents.clr.rid; recordid rid = le->contents.clr.rid;
asprintf(&ret, "UPDATE\tlsn=%9ld\tprevlsn=%9ld\txid=%4d\trid={%5d %5d %5d}\tfuncId=%3d\targSize=%9d\n", le->LSN, le->prevLSN, le->xid, asprintf(&ret, "UPDATE\tlsn=%9ld\tprevlsn=%9ld\txid=%4d\trid={%5d %5d %5ld}\tfuncId=%3d\targSize=%9d\n", le->LSN, le->prevLSN, le->xid,
rid.page, rid.slot, rid.size, le->contents.update.funcID, le->contents.update.argSize ); rid.page, rid.slot, rid.size, le->contents.update.funcID, le->contents.update.argSize );
} }
@ -43,7 +43,7 @@ static char * logEntryToString(LogEntry * le) {
case CLRLOG: case CLRLOG:
{ {
recordid rid = le->contents.clr.rid; recordid rid = le->contents.clr.rid;
asprintf(&ret, "CLR \tlsn=%9ld\tprevlsn=%9ld\txid=%4d\trid={%5d %5d %5d}\tthisUpdateLSN=%9ld\tundoNextLSN=%9ld\n", le->LSN, le->prevLSN, le->xid, asprintf(&ret, "CLR \tlsn=%9ld\tprevlsn=%9ld\txid=%4d\trid={%5d %5d %5ld}\tthisUpdateLSN=%9ld\tundoNextLSN=%9ld\n", le->LSN, le->prevLSN, le->xid,
rid.page, rid.slot, rid.size, (long int)le->contents.clr.thisUpdateLSN, (long int)le->contents.clr.undoNextLSN ); rid.page, rid.slot, rid.size, (long int)le->contents.clr.thisUpdateLSN, (long int)le->contents.clr.undoNextLSN );
} }
break; break;