-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stripped down to just contain the parlib sources
Also now set up to build using autoconf and automake tools and install via standard GNU mechanisms. Also fixed up licenses across all files.
- Loading branch information
Showing
1,294 changed files
with
1,535 additions
and
259,170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
build | ||
!src/tbb21_014oss/build | ||
*.swp | ||
ChangeLog | ||
Makefile.in | ||
aclocal.m4 | ||
autom4te.cache/ | ||
build-aux/ | ||
config.h.in | ||
configure | ||
m4/libtool.m4 | ||
m4/ltoptions.m4 | ||
m4/ltsugar.m4 | ||
m4/ltversion.m4 | ||
m4/lt~obsolete.m4 | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Kevin Klues and Barret Rhoden wrote the initial version of Parlib for the | ||
Akaros Operating system. This is a linux port of that library. | ||
<[email protected]> | ||
<[email protected]> | ||
|
||
Ben Hindman wrote the original HT library from which some of the vcore code in | ||
Parlib is inspired. However, their actual implementations vary significantly. | ||
<[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Installation instructions | ||
|
||
To install this library, simply follow the standard GNU installation procedure. | ||
|
||
If building out of the git source repo, you will need to rerun autoconf and | ||
automake. You can do these two steps together, by just running autoreconf. | ||
You therefore need to have the autotools installed on your system. | ||
The installation procedure would be: | ||
|
||
autoreconf --install | ||
mkdir build | ||
cd build | ||
../configure --prefix=<install_dir> | ||
make | ||
make install | ||
|
||
To clean up all generated files and get back to only files tracked by the git | ||
repo, you can simply run: | ||
|
||
git clean -x -d -f | ||
|
||
If building out of the tarball distribution, you can skip the autoreconf step | ||
entirely, as the files it generates are already provided to you (you can still | ||
do it if you like though). | ||
|
||
mkdir build | ||
cd build | ||
../configure --prefix=<install_dir> | ||
make | ||
make install | ||
|
||
Don't forget to use 'sudo' if you are installing into a directory which | ||
requires root priveleges. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Add the m4 directory to the include path for aclocal | ||
ACLOCAL_AMFLAGS=-I m4 | ||
|
||
# Set up global variables | ||
LIBNAME = parlib | ||
SRCDIR = $(srcdir)/@SRCDIR@ | ||
|
||
# List of C FILES to build into objects | ||
LIB_CFILES = \ | ||
@SRCDIR@/spinlock.c \ | ||
@SRCDIR@/mcs.c \ | ||
@SRCDIR@/tls.c \ | ||
@SRCDIR@/uthread.c \ | ||
@SRCDIR@/vcore.c | ||
|
||
LIB_HFILES = \ | ||
@SRCDIR@/spinlock.h \ | ||
@SRCDIR@/mcs.h \ | ||
@SRCDIR@/queue.h \ | ||
@SRCDIR@/tls.h \ | ||
@SRCDIR@/uthread.h \ | ||
@SRCDIR@/vcore.h | ||
|
||
if ARCH_i686 | ||
SYSDEPDIR = $(srcdir)/@SYSDEPDIR_i686@ | ||
|
||
LIB_SFILES = | ||
|
||
LIB_HFILES += \ | ||
@SYSDEPDIR_i686@/arch.h \ | ||
@SYSDEPDIR_i686@/atomic.h | ||
|
||
endif | ||
|
||
if ARCH_x86_64 | ||
SYSDEPDIR = $(srcdir)/@SYSDEPDIR_x86_64@ | ||
|
||
LIB_SFILES = \ | ||
@SYSDEPDIR_x86_64@/swapcontext.S \ | ||
@SYSDEPDIR_x86_64@/setcontext.S \ | ||
@SYSDEPDIR_x86_64@/getcontext.S | ||
|
||
LIB_HFILES += \ | ||
@SYSDEPDIR_x86_64@/arch.h \ | ||
@SYSDEPDIR_x86_64@/atomic.h | ||
|
||
endif | ||
|
||
# Setup parameters to build the library | ||
lib_LTLIBRARIES = libparlib.la | ||
libparlib_la_CFLAGS = $(AM_CFLAGS) | ||
libparlib_la_CFLAGS += -fno-exceptions -fno-strict-aliasing | ||
libparlib_la_CFLAGS += -I$(SYSDEPDIR) | ||
libparlib_la_SOURCES = $(LIB_CFILES) $(LIB_SFILES) $(LIB_HFILES) | ||
libparlib_la_LIBADD = -lpthread | ||
|
||
# Setup a directory where all of the include files will be installed | ||
incdir = $(includedir)/$(LIBNAME) | ||
dist_inc_DATA = $(LIB_HFILES) | ||
|
||
# Setup parameters to build the test programs | ||
check_PROGRAMS = lock_test vcore_test | ||
|
||
lock_test_SOURCES = @TESTSDIR@/lock_test.c | ||
lock_test_CFLAGS = $(AM_CFLAGS) | ||
lock_test_CFLAGS += -I$(SRCDIR) -I$(SYSDEPDIR) | ||
lock_test_LDADD = libparlib.la | ||
|
||
vcore_test_SOURCES = @TESTSDIR@/vcore_test.c | ||
vcore_test_CFLAGS = $(AM_CFLAGS) | ||
vcore_test_CFLAGS += -I$(SRCDIR) -I$(SYSDEPDIR) | ||
vcore_test_LDADD = libparlib.la | ||
|
||
ChangeLog: | ||
cd $(srcdir); \ | ||
./git-changelog.sh | ||
|
||
.PHONY: ChangeLog | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,25 @@ | ||
Fill me in | ||
Parlib 1.0 | ||
For questions or comments, please contact: Kevin Klues <[email protected]> | ||
|
||
* This is a Linux ONLY port of the Parlib library | ||
* Unless otherwise noted in individual files, all software contained in this | ||
directory is licensed under an LGPL license. Please see the COPYING.LESSER | ||
and COYPING files located in this directory for details. | ||
* Please see the INSTALL file for installation instructions. | ||
* Please see the AUTHOR file for author information. | ||
|
||
The Parlib library was originally written for the Akaros operating system. For | ||
this reason, this port was originally designed as an emulation layer on top of | ||
Linux that would allow developers to write applications and test them on a | ||
linux system before deplying them on Akaros. | ||
|
||
Since its original inception, however, we've discovered that Parlib is useful | ||
in its own right as a standalone library on linux for use by other projects. | ||
Most notably, as the backend for the Lithe implementation. | ||
|
||
At present, Parlib provides 3 primary services to developers: | ||
1) A virtual core (vcore) abstraction | ||
2) A user-level thread (uthread) abstraction | ||
3) User-space Mcs and Spin Locks | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Require a minimum autoconf version | ||
AC_PREREQ([2.65]) | ||
|
||
# Initialize autoconf | ||
# Specify package's name, version number, and bug-report address. | ||
AC_INIT([Parlib], [1.0], [[email protected]]) | ||
|
||
# Directory containing any external m4 macros | ||
AC_CONFIG_MACRO_DIR([m4]) | ||
|
||
# Auxiliary scripts such as install-sh and depcomp should be in DIRECTORY | ||
AC_CONFIG_AUX_DIR([build-aux]) | ||
|
||
# Initialize automake | ||
# Turn on all Automake warnings and report them as errors. | ||
# This is a foreign package | ||
AM_INIT_AUTOMAKE([subdir-objects foreign -Wall -Werror -Wno-portability]) | ||
|
||
# Checks for a C compiler | ||
AC_PROG_CC | ||
|
||
# Checks for a C++ compiler | ||
#AC_PROG_CXX | ||
|
||
# Check for an assembler | ||
AM_PROG_AS | ||
|
||
# Checks for libtool | ||
AC_PROG_LIBTOOL | ||
|
||
# Check for HEADERS and #define HAVE_HEADER_H for each header found | ||
#AC_CHECK_HEADERS([HEADERS ...]) | ||
|
||
# Output the following to config.h | ||
#AC_DEFINE(VARIABLE, VALUE, DESCRIPTION) | ||
|
||
# Declare config.h as the output header | ||
AC_CONFIG_HEADERS([config.h]) | ||
|
||
# Declare Makefiles as output files | ||
AC_CONFIG_FILES([ | ||
Makefile | ||
]) | ||
|
||
# A safety check. FILE is a distributed source file, making sure that | ||
# 'configure' is not run from outerspace. | ||
AC_CONFIG_SRCDIR([src/vcore.c]) | ||
|
||
# Set the common AM_CFLAGS for all Makefile.am files | ||
AC_SUBST([AM_CFLAGS],[" \ | ||
-g -O2 -Wall -std=gnu99 \ | ||
-Wno-unused-function \ | ||
-Wno-unused-value \ | ||
-Wno-missing-braces | ||
"]) | ||
|
||
# Set up some global variables for use in the makefile | ||
SRCDIR=src | ||
TESTSDIR=tests | ||
SYSDEPDIR_BASE=$SRCDIR/sysdeps/unix/sysv/linux | ||
SYSDEPDIR_i686=$SYSDEPDIR_BASE/i686 | ||
SYSDEPDIR_x86_64=$SYSDEPDIR_BASE/x86_64 | ||
AC_SUBST([SRCDIR]) | ||
AC_SUBST([TESTSDIR]) | ||
AC_SUBST([SYSDEPDIR_i686]) | ||
AC_SUBST([SYSDEPDIR_x86_64]) | ||
AM_SUBST_NOTMAKE([SRCDIR]) | ||
AM_SUBST_NOTMAKE([TESTSDIR]) | ||
AM_SUBST_NOTMAKE([SYSDEPDIR_i686]) | ||
AM_SUBST_NOTMAKE([SYSDEPDIR_x86_64]) | ||
|
||
case $host in | ||
*i686*) | ||
ARCH_i686=true;; | ||
*x86_64*) | ||
ARCH_x86_64=true;; | ||
esac | ||
AM_CONDITIONAL([ARCH_i686], [test x$ARCH_i686 = xtrue]) | ||
AM_CONDITIONAL([ARCH_x86_64], [test x$ARCH_x86_64 = xtrue]) | ||
|
||
# Check whether LIBRARY exists and contains FUNCT | ||
# Execute ACT-IF-FOUND if it does. ACT-IF-NOT otherwise. | ||
#AC_CHECK_LIB(LIBRARY, FUNCT, [ACT-IF-FOUND], [ACT-IF-NOT]) | ||
|
||
# Actually output all declared files | ||
AC_OUTPUT |
Oops, something went wrong.