Index: benchmark/Makefile.am
===================================================================
--- benchmark/Makefile.am	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/Makefile.am	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,322 @@
+######################## -*- Mode: Makefile-Automake -*- ######################
+##
+## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+##
+## The contents of this file are covered under the licence agreement in the
+## file "LICENCE" distributed with Cforall.
+##
+## Makefile.am --
+##
+## Author           : Peter A. Buhr
+## Created On       : Sun May 31 09:08:15 2015
+## Last Modified By : Peter A. Buhr
+## Last Modified On : Mon Jan 25 22:31:42 2016
+## Update Count     : 25
+###############################################################################
+
+# applies to both programs
+CFLAGS =
+AM_CFLAGS = \
+	-g \
+	-O2 \
+	-Wall \
+	-Wno-unused-function \
+	-quiet \
+	-I$(srcdir) \
+	@BUILD_IN_TREE_FLAGS@
+
+CC = @CFACC@
+TOOLSDIR = ${abs_top_srcdir}/tools/
+REPEAT   = ${TOOLSDIR}repeat
+STATS    = ${TOOLSDIR}stat.py
+repeats  = 30
+skipcompile = no
+TIME_FORMAT = "%E"
+PRINT_FORMAT = %20s: #Comments needed for spacing
+
+.NOTPARALLEL:
+
+noinst_PROGRAMS =
+
+all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT)
+
+%.run : %$(EXEEXT) ${REPEAT}
+	@rm -f .result.log
+	@echo "------------------------------------------------------"
+	@echo $<
+	@${REPEAT} ${repeats} ./a.out | tee -a .result.log
+	@${STATS} .result.log
+	@echo "------------------------------------------------------"
+	@rm -f a.out .result.log
+
+%.runquiet :
+	@+make $(basename $@) CFLAGS="-w"
+	@taskset -c 1 ./a.out
+	@rm -f a.out
+
+%.make :
+	@printf "${PRINT_FORMAT}" $(basename $(subst compile-,,$@))
+	@+/usr/bin/time -f ${TIME_FORMAT} make $(basename $@) 2>&1
+
+${REPEAT} :
+	@+make -C ${TOOLSDIR} repeat
+
+## =========================================================================================================
+
+jenkins$(EXEEXT):
+	@echo "{"
+	@echo -e '\t"githash": "'${githash}'",'
+	@echo -e '\t"arch": "'   ${arch}   '",'
+@DOifskipcompile@
+	@echo -e '\t"compile": {'
+	@+make compile TIME_FORMAT='%e,' PRINT_FORMAT='\t\t\"%s\" :'
+	@echo -e '\t\t"dummy" : {}'
+	@echo -e '\t},'
+@DOendif@
+	@echo -e '\t"ctxswitch": {'
+	@echo -en '\t\t"coroutine":'
+	@+make ctxswitch-cfa_coroutine.runquiet
+	@echo -en '\t\t,"thread":'
+	@+make ctxswitch-cfa_thread.runquiet
+	@echo -e '\t},'
+	@echo -e '\t"mutex": ['
+	@echo -en '\t\t'
+	@+make mutex-cfa1.runquiet
+	@echo -en '\t\t,'
+	@+make mutex-cfa2.runquiet
+	@echo -e '\t],'
+	@echo -e '\t"scheduling": ['
+	@echo -en '\t\t'
+	@+make signal-cfa1.runquiet
+	@echo -en '\t\t,'
+	@+make signal-cfa2.runquiet
+	@echo -en '\t\t,'
+	@+make waitfor-cfa1.runquiet
+	@echo -en '\t\t,'
+	@+make waitfor-cfa2.runquiet
+	@echo -e '\n\t],'
+	@echo -e '\t"epoch": ' $(shell date +%s)
+	@echo "}"
+
+## =========================================================================================================
+loop$(EXEEXT):
+	@@BACKEND_CC@ loop.c      -DBENCH_N=5000000000 -I$(srcdir) -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+function$(EXEEXT):
+	@@BACKEND_CC@ function.c  -DBENCH_N=5000000000 -I$(srcdir) -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+fetch_add$(EXEEXT):
+	@@BACKEND_CC@ fetch_add.c -DBENCH_N=500000000  -I$(srcdir) -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+## =========================================================================================================
+ctxswitch$(EXEEXT): \
+	loop.run				\
+	function.run			\
+	fetch_add.run			\
+	ctxswitch-pthread.run		\
+	ctxswitch-cfa_coroutine.run	\
+	ctxswitch-cfa_thread.run	\
+	ctxswitch-cfa_thread2.run	\
+	ctxswitch-upp_coroutine.run	\
+	ctxswitch-upp_thread.run	\
+	-ctxswitch-kos_fibre.run	\
+	-ctxswitch-kos_fibre2.run	\
+	ctxswitch-goroutine.run		\
+	ctxswitch-java_thread.run
+
+ctxswitch-pthread$(EXEEXT):
+	@@BACKEND_CC@ $(srcdir)/ctxswitch/pthreads.c     -DBENCH_N=50000000  -I$(srcdir) -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+ctxswitch-cfa_coroutine$(EXEEXT):
+	@${CC}        $(srcdir)/ctxswitch/cfa_cor.c      -DBENCH_N=50000000  -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+ctxswitch-cfa_thread$(EXEEXT):
+	@${CC}        $(srcdir)/ctxswitch/cfa_thrd.c     -DBENCH_N=50000000  -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+ctxswitch-cfa_thread2$(EXEEXT):
+	@${CC}        $(srcdir)/ctxswitch/cfa_thrd2.c    -DBENCH_N=50000000  -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+ctxswitch-upp_coroutine$(EXEEXT):
+	@u++          $(srcdir)/ctxswitch/upp_cor.cc     -DBENCH_N=50000000  -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+ctxswitch-upp_thread$(EXEEXT):
+	@u++          $(srcdir)/ctxswitch/upp_thrd.cc    -DBENCH_N=50000000  -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+ctxswitch-kos_fibre$(EXEEXT):
+	@${CXX}       $(srcdir)/ctxswitch/kos_fibre.cpp  -DBENCH_N=50000000  -I$(srcdir) -I/home/tdelisle/software/KOS/src/ -g -O2 -lfibre -lpthread -lrt
+
+ctxswitch-kos_fibre2$(EXEEXT):
+	@${CXX}       $(srcdir)/ctxswitch/kos_fibre2.cpp -DBENCH_N=50000000  -I$(srcdir) -I/home/tdelisle/software/KOS/src/ -g -O2 -lfibre -lpthread -lrt
+
+ctxswitch-goroutine$(EXEEXT):
+	@go build -o a.out $(srcdir)/ctxswitch/goroutine.go
+
+ctxswitch-java_thread$(EXEEXT):
+	@javac $(srcdir)/ctxswitch/JavaThread.java
+	@echo "#!/bin/sh" > a.out
+	@echo "cd ctxswitch && java JavaThread" >> a.out
+	@chmod a+x a.out
+
+## =========================================================================================================
+mutex$(EXEEXT) :\
+	loop.run			\
+	function.run		\
+	fetch_add.run		\
+	mutex-pthread_lock.run	\
+	mutex-upp.run		\
+	mutex-cfa1.run		\
+	mutex-cfa2.run		\
+	mutex-cfa4.run		\
+	mutex-java_thread.run
+
+mutex-pthread_lock$(EXEEXT):
+	@@BACKEND_CC@ $(srcdir)/mutex/pthreads.c    -DBENCH_N=50000000    -I$(srcdir) -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+mutex-upp$(EXEEXT):
+	@u++          $(srcdir)/mutex/upp.cc        -DBENCH_N=50000000    -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+mutex-cfa1$(EXEEXT):
+	@${CC}        $(srcdir)/mutex/cfa1.c        -DBENCH_N=5000000     -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+mutex-cfa2$(EXEEXT):
+	@${CC}        $(srcdir)/mutex/cfa2.c        -DBENCH_N=5000000     -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+mutex-cfa4$(EXEEXT):
+	@${CC}        $(srcdir)/mutex/cfa4.c        -DBENCH_N=5000000     -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+mutex-java_thread$(EXEEXT):
+	@javac $(srcdir)/mutex/JavaThread.java
+	@echo "#!/bin/sh" > a.out
+	@echo "cd mutex && java JavaThread" >> a.out
+	@chmod a+x a.out
+
+## =========================================================================================================
+signal$(EXEEXT) :\
+	signal-pthread_cond.run \
+	signal-upp.run		\
+	signal-cfa1.run		\
+	signal-cfa2.run		\
+	signal-cfa4.run		\
+	signal-java_thread.run
+
+signal-pthread_cond$(EXEEXT):
+	@@BACKEND_CC@ $(srcdir)/schedint/pthreads.c -DBENCH_N=500000      -I$(srcdir) -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+signal-upp$(EXEEXT):
+	@u++          $(srcdir)/schedint/upp.cc     -DBENCH_N=5000000     -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+signal-cfa1$(EXEEXT):
+	@${CC}        $(srcdir)/schedint/cfa1.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+signal-cfa2$(EXEEXT):
+	@${CC}        $(srcdir)/schedint/cfa2.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+signal-cfa4$(EXEEXT):
+	@${CC}        $(srcdir)/schedint/cfa4.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+signal-java_thread$(EXEEXT):
+	@javac $(srcdir)/schedint/JavaThread.java
+	@echo "#!/bin/sh" > a.out
+	@echo "cd schedint && java JavaThread" >> a.out
+	@chmod a+x a.out
+
+
+## =========================================================================================================
+waitfor$(EXEEXT) :\
+	waitfor-upp.run		\
+	waitfor-cfa1.run		\
+	waitfor-cfa2.run		\
+	waitfor-cfa4.run
+
+waitfor-upp$(EXEEXT):
+	@u++          $(srcdir)/schedext/upp.cc     -DBENCH_N=5000000     -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+waitfor-cfa1$(EXEEXT):
+	@${CC}        $(srcdir)/schedext/cfa1.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+waitfor-cfa2$(EXEEXT):
+	@${CC}        $(srcdir)/schedext/cfa2.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+waitfor-cfa4$(EXEEXT):
+	@${CC}        $(srcdir)/schedext/cfa4.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+## =========================================================================================================
+creation$(EXEEXT) :\
+	creation-pthread.run			\
+	creation-cfa_coroutine.run		\
+	creation-cfa_coroutine_eager.run	\
+	creation-cfa_thread.run			\
+	creation-upp_coroutine.run		\
+	creation-upp_thread.run			\
+	creation-goroutine.run			\
+	creation-java_thread.run
+
+creation-cfa_coroutine$(EXEEXT):
+	@${CC}        $(srcdir)/creation/cfa_cor.c   -DBENCH_N=10000000   -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-cfa_coroutine_eager$(EXEEXT):
+	@${CC}        $(srcdir)/creation/cfa_cor.c   -DBENCH_N=10000000   -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -DEAGER
+
+creation-cfa_thread$(EXEEXT):
+	@${CC}        $(srcdir)/creation/cfa_thrd.c  -DBENCH_N=10000000   -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-upp_coroutine$(EXEEXT):
+	@u++          $(srcdir)/creation/upp_cor.cc  -DBENCH_N=50000000   -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-upp_thread$(EXEEXT):
+	@u++          $(srcdir)/creation/upp_thrd.cc -DBENCH_N=50000000   -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-pthread$(EXEEXT):
+	@@BACKEND_CC@ $(srcdir)/creation/pthreads.c  -DBENCH_N=250000     -I$(srcdir) -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-goroutine$(EXEEXT):
+	@go build -o a.out $(srcdir)/creation/goroutine.go
+
+creation-java_thread$(EXEEXT):
+	@javac $(srcdir)/creation/JavaThread.java
+	@echo "#!/bin/sh" > a.out
+	@echo "cd creation && java JavaThread" >> a.out
+	@chmod a+x a.out
+
+## =========================================================================================================
+
+compile$(EXEEXT) :\
+	compile-array.make	\
+	compile-attributes.make	\
+	compile-empty.make  	\
+	compile-expression.make	\
+	compile-io.make		\
+	compile-monitor.make	\
+	compile-operators.make	\
+	compile-typeof.make
+
+
+testdir = $(top_srcdir)/src/tests
+
+compile-array$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(testdir)/array.c			@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+compile-attributes$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(testdir)/attributes.c		@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+compile-empty$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(srcdir)/compile/empty.c          @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+compile-expression$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(testdir)/expression.c		@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+compile-io$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(testdir)/io1.c				@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+compile-monitor$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(testdir)/concurrent/monitor.c	@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+compile-operators$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(testdir)/operators.c			@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+compile-thread$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(testdir)/concurrent/thread.c	@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+compile-typeof$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(testdir)/typeof.c			@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
Index: benchmark/Makefile.in
===================================================================
--- benchmark/Makefile.in	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/Makefile.in	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,732 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 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.
+
+@SET_MAKE@
+
+######################## -*- Mode: Makefile-Automake -*- ######################
+###############################################################################
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS =
+subdir = benchmark
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in compile
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BACKEND_CC = @BACKEND_CC@
+BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
+BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@
+CC = @CFACC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFACC = @CFACC@
+CFACPP = @CFACPP@
+CFA_BACKEND_CC = @CFA_BACKEND_CC@
+CFA_BINDIR = @CFA_BINDIR@
+CFA_FLAGS = @CFA_FLAGS@
+CFA_INCDIR = @CFA_INCDIR@
+CFA_LIBDIR = @CFA_LIBDIR@
+CFA_NAME = @CFA_NAME@
+CFA_PREFIX = @CFA_PREFIX@
+
+# applies to both programs
+CFLAGS = 
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DRIVER_DIR = @DRIVER_DIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MACHINE_TYPE = @MACHINE_TYPE@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CFLAGS = \
+	-g \
+	-O2 \
+	-Wall \
+	-Wno-unused-function \
+	-quiet \
+	-I$(srcdir) \
+	@BUILD_IN_TREE_FLAGS@
+
+TOOLSDIR = ${abs_top_srcdir}/tools/
+REPEAT = ${TOOLSDIR}repeat
+STATS = ${TOOLSDIR}stat.py
+repeats = 30
+skipcompile = no
+TIME_FORMAT = "%E"
+PRINT_FORMAT = %20s: #Comments needed for spacing
+testdir = $(top_srcdir)/src/tests
+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 ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign benchmark/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign benchmark/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
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$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 $(PROGRAMS)
+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:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic \
+	clean-noinstPROGRAMS cscopelist-am ctags-am distclean \
+	distclean-generic distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
+	uninstall-am
+
+.PRECIOUS: Makefile
+
+
+.NOTPARALLEL:
+
+all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT)
+
+%.run : %$(EXEEXT) ${REPEAT}
+	@rm -f .result.log
+	@echo "------------------------------------------------------"
+	@echo $<
+	@${REPEAT} ${repeats} ./a.out | tee -a .result.log
+	@${STATS} .result.log
+	@echo "------------------------------------------------------"
+	@rm -f a.out .result.log
+
+%.runquiet :
+	@+make $(basename $@) CFLAGS="-w"
+	@taskset -c 1 ./a.out
+	@rm -f a.out
+
+%.make :
+	@printf "${PRINT_FORMAT}" $(basename $(subst compile-,,$@))
+	@+/usr/bin/time -f ${TIME_FORMAT} make $(basename $@) 2>&1
+
+${REPEAT} :
+	@+make -C ${TOOLSDIR} repeat
+
+jenkins$(EXEEXT):
+	@echo "{"
+	@echo -e '\t"githash": "'${githash}'",'
+	@echo -e '\t"arch": "'   ${arch}   '",'
+@DOifskipcompile@
+	@echo -e '\t"compile": {'
+	@+make compile TIME_FORMAT='%e,' PRINT_FORMAT='\t\t\"%s\" :'
+	@echo -e '\t\t"dummy" : {}'
+	@echo -e '\t},'
+@DOendif@
+	@echo -e '\t"ctxswitch": {'
+	@echo -en '\t\t"coroutine":'
+	@+make ctxswitch-cfa_coroutine.runquiet
+	@echo -en '\t\t,"thread":'
+	@+make ctxswitch-cfa_thread.runquiet
+	@echo -e '\t},'
+	@echo -e '\t"mutex": ['
+	@echo -en '\t\t'
+	@+make mutex-cfa1.runquiet
+	@echo -en '\t\t,'
+	@+make mutex-cfa2.runquiet
+	@echo -e '\t],'
+	@echo -e '\t"scheduling": ['
+	@echo -en '\t\t'
+	@+make signal-cfa1.runquiet
+	@echo -en '\t\t,'
+	@+make signal-cfa2.runquiet
+	@echo -en '\t\t,'
+	@+make waitfor-cfa1.runquiet
+	@echo -en '\t\t,'
+	@+make waitfor-cfa2.runquiet
+	@echo -e '\n\t],'
+	@echo -e '\t"epoch": ' $(shell date +%s)
+	@echo "}"
+
+loop$(EXEEXT):
+	@@BACKEND_CC@ loop.c      -DBENCH_N=5000000000 -I$(srcdir) -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+function$(EXEEXT):
+	@@BACKEND_CC@ function.c  -DBENCH_N=5000000000 -I$(srcdir) -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+fetch_add$(EXEEXT):
+	@@BACKEND_CC@ fetch_add.c -DBENCH_N=500000000  -I$(srcdir) -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+ctxswitch$(EXEEXT): \
+	loop.run				\
+	function.run			\
+	fetch_add.run			\
+	ctxswitch-pthread.run		\
+	ctxswitch-cfa_coroutine.run	\
+	ctxswitch-cfa_thread.run	\
+	ctxswitch-cfa_thread2.run	\
+	ctxswitch-upp_coroutine.run	\
+	ctxswitch-upp_thread.run	\
+	-ctxswitch-kos_fibre.run	\
+	-ctxswitch-kos_fibre2.run	\
+	ctxswitch-goroutine.run		\
+	ctxswitch-java_thread.run
+
+ctxswitch-pthread$(EXEEXT):
+	@@BACKEND_CC@ $(srcdir)/ctxswitch/pthreads.c     -DBENCH_N=50000000  -I$(srcdir) -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+ctxswitch-cfa_coroutine$(EXEEXT):
+	@${CC}        $(srcdir)/ctxswitch/cfa_cor.c      -DBENCH_N=50000000  -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+ctxswitch-cfa_thread$(EXEEXT):
+	@${CC}        $(srcdir)/ctxswitch/cfa_thrd.c     -DBENCH_N=50000000  -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+ctxswitch-cfa_thread2$(EXEEXT):
+	@${CC}        $(srcdir)/ctxswitch/cfa_thrd2.c    -DBENCH_N=50000000  -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+ctxswitch-upp_coroutine$(EXEEXT):
+	@u++          $(srcdir)/ctxswitch/upp_cor.cc     -DBENCH_N=50000000  -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+ctxswitch-upp_thread$(EXEEXT):
+	@u++          $(srcdir)/ctxswitch/upp_thrd.cc    -DBENCH_N=50000000  -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+ctxswitch-kos_fibre$(EXEEXT):
+	@${CXX}       $(srcdir)/ctxswitch/kos_fibre.cpp  -DBENCH_N=50000000  -I$(srcdir) -I/home/tdelisle/software/KOS/src/ -g -O2 -lfibre -lpthread -lrt
+
+ctxswitch-kos_fibre2$(EXEEXT):
+	@${CXX}       $(srcdir)/ctxswitch/kos_fibre2.cpp -DBENCH_N=50000000  -I$(srcdir) -I/home/tdelisle/software/KOS/src/ -g -O2 -lfibre -lpthread -lrt
+
+ctxswitch-goroutine$(EXEEXT):
+	@go build -o a.out $(srcdir)/ctxswitch/goroutine.go
+
+ctxswitch-java_thread$(EXEEXT):
+	@javac $(srcdir)/ctxswitch/JavaThread.java
+	@echo "#!/bin/sh" > a.out
+	@echo "cd ctxswitch && java JavaThread" >> a.out
+	@chmod a+x a.out
+
+mutex$(EXEEXT) :\
+	loop.run			\
+	function.run		\
+	fetch_add.run		\
+	mutex-pthread_lock.run	\
+	mutex-upp.run		\
+	mutex-cfa1.run		\
+	mutex-cfa2.run		\
+	mutex-cfa4.run		\
+	mutex-java_thread.run
+
+mutex-pthread_lock$(EXEEXT):
+	@@BACKEND_CC@ $(srcdir)/mutex/pthreads.c    -DBENCH_N=50000000    -I$(srcdir) -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+mutex-upp$(EXEEXT):
+	@u++          $(srcdir)/mutex/upp.cc        -DBENCH_N=50000000    -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+mutex-cfa1$(EXEEXT):
+	@${CC}        $(srcdir)/mutex/cfa1.c        -DBENCH_N=5000000     -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+mutex-cfa2$(EXEEXT):
+	@${CC}        $(srcdir)/mutex/cfa2.c        -DBENCH_N=5000000     -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+mutex-cfa4$(EXEEXT):
+	@${CC}        $(srcdir)/mutex/cfa4.c        -DBENCH_N=5000000     -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+mutex-java_thread$(EXEEXT):
+	@javac $(srcdir)/mutex/JavaThread.java
+	@echo "#!/bin/sh" > a.out
+	@echo "cd mutex && java JavaThread" >> a.out
+	@chmod a+x a.out
+
+signal$(EXEEXT) :\
+	signal-pthread_cond.run \
+	signal-upp.run		\
+	signal-cfa1.run		\
+	signal-cfa2.run		\
+	signal-cfa4.run		\
+	signal-java_thread.run
+
+signal-pthread_cond$(EXEEXT):
+	@@BACKEND_CC@ $(srcdir)/schedint/pthreads.c -DBENCH_N=500000      -I$(srcdir) -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+signal-upp$(EXEEXT):
+	@u++          $(srcdir)/schedint/upp.cc     -DBENCH_N=5000000     -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+signal-cfa1$(EXEEXT):
+	@${CC}        $(srcdir)/schedint/cfa1.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+signal-cfa2$(EXEEXT):
+	@${CC}        $(srcdir)/schedint/cfa2.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+signal-cfa4$(EXEEXT):
+	@${CC}        $(srcdir)/schedint/cfa4.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+signal-java_thread$(EXEEXT):
+	@javac $(srcdir)/schedint/JavaThread.java
+	@echo "#!/bin/sh" > a.out
+	@echo "cd schedint && java JavaThread" >> a.out
+	@chmod a+x a.out
+
+waitfor$(EXEEXT) :\
+	waitfor-upp.run		\
+	waitfor-cfa1.run		\
+	waitfor-cfa2.run		\
+	waitfor-cfa4.run
+
+waitfor-upp$(EXEEXT):
+	@u++          $(srcdir)/schedext/upp.cc     -DBENCH_N=5000000     -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+waitfor-cfa1$(EXEEXT):
+	@${CC}        $(srcdir)/schedext/cfa1.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+waitfor-cfa2$(EXEEXT):
+	@${CC}        $(srcdir)/schedext/cfa2.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+waitfor-cfa4$(EXEEXT):
+	@${CC}        $(srcdir)/schedext/cfa4.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation$(EXEEXT) :\
+	creation-pthread.run			\
+	creation-cfa_coroutine.run		\
+	creation-cfa_coroutine_eager.run	\
+	creation-cfa_thread.run			\
+	creation-upp_coroutine.run		\
+	creation-upp_thread.run			\
+	creation-goroutine.run			\
+	creation-java_thread.run
+
+creation-cfa_coroutine$(EXEEXT):
+	@${CC}        $(srcdir)/creation/cfa_cor.c   -DBENCH_N=10000000   -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-cfa_coroutine_eager$(EXEEXT):
+	@${CC}        $(srcdir)/creation/cfa_cor.c   -DBENCH_N=10000000   -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -DEAGER
+
+creation-cfa_thread$(EXEEXT):
+	@${CC}        $(srcdir)/creation/cfa_thrd.c  -DBENCH_N=10000000   -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-upp_coroutine$(EXEEXT):
+	@u++          $(srcdir)/creation/upp_cor.cc  -DBENCH_N=50000000   -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-upp_thread$(EXEEXT):
+	@u++          $(srcdir)/creation/upp_thrd.cc -DBENCH_N=50000000   -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-pthread$(EXEEXT):
+	@@BACKEND_CC@ $(srcdir)/creation/pthreads.c  -DBENCH_N=250000     -I$(srcdir) -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+creation-goroutine$(EXEEXT):
+	@go build -o a.out $(srcdir)/creation/goroutine.go
+
+creation-java_thread$(EXEEXT):
+	@javac $(srcdir)/creation/JavaThread.java
+	@echo "#!/bin/sh" > a.out
+	@echo "cd creation && java JavaThread" >> a.out
+	@chmod a+x a.out
+
+compile$(EXEEXT) :\
+	compile-array.make	\
+	compile-attributes.make	\
+	compile-empty.make  	\
+	compile-expression.make	\
+	compile-io.make		\
+	compile-monitor.make	\
+	compile-operators.make	\
+	compile-typeof.make
+
+compile-array$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(testdir)/array.c			@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+compile-attributes$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(testdir)/attributes.c		@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+compile-empty$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(srcdir)/compile/empty.c          @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+compile-expression$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(testdir)/expression.c		@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+compile-io$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(testdir)/io1.c				@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+compile-monitor$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(testdir)/concurrent/monitor.c	@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+compile-operators$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(testdir)/operators.c			@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+compile-thread$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(testdir)/concurrent/thread.c	@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+compile-typeof$(EXEEXT):
+	@${CC} -quiet -fsyntax-only -w $(testdir)/typeof.c			@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
+# 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:
Index: benchmark/Monitor.c
===================================================================
--- benchmark/Monitor.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/Monitor.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,32 @@
+#include <fstream>
+#include <stdlib>
+#include <thread>
+
+#include "bench.h"
+
+monitor mon_t {};
+
+mon_t mon1, mon2;
+
+void dummy( mon_t * mutex a ) {}
+void dummy( mon_t * mutex a, mon_t * mutex b ) {}
+
+int main() {
+	long long int StartTime, EndTime;
+
+	StartTime = Time();
+	for( int i = 0; i < N; i++ ) {
+		dummy( &mon1 );
+	}
+	EndTime = Time();
+
+	sout | ( EndTime - StartTime ) / N;
+
+	StartTime = Time();
+	for( int i = 0; i < N; i++ ) {
+		dummy( &mon1, &mon2 );
+	}
+	EndTime = Time();
+
+	sout | ( EndTime - StartTime ) / N | endl;
+}
Index: benchmark/bench.h
===================================================================
--- benchmark/bench.h	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/bench.h	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,54 @@
+#pragma once
+
+#if defined(__cforall)
+extern "C" {
+#endif
+	#include <stdlib.h>
+	#include <unistd.h>					// sysconf
+#if ! defined(__cforall)
+	#include <time.h>
+	#include <sys/time.h>
+#else
+}
+#include <time>
+#endif
+
+
+static inline unsigned long long int bench_time() {
+    struct timespec ts;
+    clock_gettime(
+#if defined( __linux__ )
+	 CLOCK_THREAD_CPUTIME_ID,
+#elif defined( __freebsd__ )
+	 CLOCK_PROF,
+#elif defined( __solaris__ )
+	 CLOCK_HIGHRES,
+#else
+    #error uC++ : internal error, unsupported architecture
+#endif
+	 &ts );
+    return 1000000000LL * ts.tv_sec + ts.tv_nsec;
+} // Time
+
+#ifndef BENCH_N
+#define BENCH_N 500 //10000000
+#endif
+
+#define BENCH(statement, output)		\
+	size_t n = BENCH_N;			\
+	if( argc > 2 ) return 1;		\
+	if( argc == 2 ) {				\
+		n = atoi(argv[1]);		\
+	}						\
+	long long int StartTime, EndTime;	\
+	StartTime = bench_time();		\
+	statement;					\
+	EndTime = bench_time();			\
+	unsigned long long int output = 	\
+	( EndTime - StartTime ) / n;
+
+#if defined(__cforall)
+Duration default_preemption() {
+	return 0;
+}
+#endif
Index: benchmark/compile/empty.c
===================================================================
--- benchmark/compile/empty.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/compile/empty.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,3 @@
+int main() {
+	return 0;
+}
Index: benchmark/creation/JavaThread.java
===================================================================
--- benchmark/creation/JavaThread.java	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/creation/JavaThread.java	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,18 @@
+public class JavaThread {
+	public static class MyThread extends Thread {
+		@Override
+		public void run() {}
+	}
+
+	public static void main(String[] args) throws InterruptedException {
+		int NoOfTimes = 50000;
+		long start = System.nanoTime();
+		for(int i = 1; i <= NoOfTimes; i += 1) {
+			JavaThread.MyThread m = new JavaThread.MyThread();
+        		m.start();
+			m.join();
+		}
+		long end = System.nanoTime();
+		System.out.println( (end - start) / NoOfTimes);
+	}
+}
Index: benchmark/creation/cfa_cor.c
===================================================================
--- benchmark/creation/cfa_cor.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/creation/cfa_cor.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,23 @@
+#include <stdio.h>
+#include <coroutine>
+
+#include "bench.h"
+
+coroutine MyCoroutine {};
+void ?{} (MyCoroutine & this) {
+#ifdef EAGER
+	prime(this);
+#endif
+}
+void main(MyCoroutine & this) {}
+
+int main(int argc, char* argv[]) {
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			MyCoroutine m;
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/creation/cfa_thrd.c
===================================================================
--- benchmark/creation/cfa_thrd.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/creation/cfa_thrd.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include <thread>
+
+#include "bench.h"
+
+thread MyThread {};
+void main(MyThread & this) {}
+
+int main(int argc, char* argv[]) {
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			MyThread m;
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/creation/goroutine.go
===================================================================
--- benchmark/creation/goroutine.go	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/creation/goroutine.go	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,27 @@
+package main
+
+import (
+    "fmt"
+    "time"
+)
+
+var shake chan bool = make( chan bool )
+
+func noop() {
+	shake <- true   // indicate completion
+}
+
+//=======================================
+// benchmark driver
+//=======================================
+
+func main() {
+	const NoOfTimes = 500000
+	start := time.Now()
+	for i := 1; i <= NoOfTimes; i += 1 {
+		go noop()		// creation
+	}
+	end := time.Now()
+	fmt.Printf("%d\n", end.Sub(start) / time.Duration(NoOfTimes))
+	<- shake
+}
Index: benchmark/creation/pthreads.c
===================================================================
--- benchmark/creation/pthreads.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/creation/pthreads.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,28 @@
+#include <pthread.h>
+#include <stdio.h>
+
+#include "bench.h"
+
+static void *foo(void *arg) {
+    return arg;
+}
+
+int main(int argc, char* argv[]) {
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			pthread_t thread;
+			if (pthread_create(&thread, NULL, foo, NULL) < 0) {
+				perror( "failure" );
+				return 1;
+			}
+
+			if (pthread_join( thread, NULL) < 0) {
+				perror( "failure" );
+				return 1;
+			}
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/creation/upp_cor.cc
===================================================================
--- benchmark/creation/upp_cor.cc	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/creation/upp_cor.cc	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,18 @@
+#include <cstdio>
+
+#include "bench.h"
+
+_Coroutine MyCor {
+	void main() {}
+};
+
+int main(int argc, char* argv[]) {
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			MyCor m;
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/creation/upp_thrd.cc
===================================================================
--- benchmark/creation/upp_thrd.cc	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/creation/upp_thrd.cc	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,18 @@
+#include <cstdio>
+
+#include "bench.h"
+
+_Task MyThread {
+	void main() {}
+};
+
+int main(int argc, char* argv[]) {
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			MyThread m;
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/ctxswitch/JavaThread.java
===================================================================
--- benchmark/ctxswitch/JavaThread.java	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/ctxswitch/JavaThread.java	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,11 @@
+public class JavaThread {
+	public static void main(String[] args) {
+		int NoOfTimes = 5000000;
+		long start = System.nanoTime();
+		for(int i = 1; i <= NoOfTimes; i += 1) {
+			Thread.yield();
+		}
+		long end = System.nanoTime();
+		System.out.println( (end - start) / NoOfTimes);
+	}
+}
Index: benchmark/ctxswitch/cfa_cor.c
===================================================================
--- benchmark/ctxswitch/cfa_cor.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/ctxswitch/cfa_cor.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,30 @@
+#include <stdio.h>
+#include <kernel>
+#include <thread>
+
+#include "bench.h"
+
+coroutine GreatSuspender {};
+
+void ?{}( GreatSuspender & this ) {
+	prime(this);
+}
+
+void main( GreatSuspender & this ) {
+	while( true ) {
+		suspend();
+	}
+}
+
+int main(int argc, char* argv[]) {
+	GreatSuspender s;
+
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			resume( s );
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/ctxswitch/cfa_thrd.c
===================================================================
--- benchmark/ctxswitch/cfa_thrd.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/ctxswitch/cfa_thrd.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,15 @@
+#include <stdio.h>
+#include <thread>
+
+#include "bench.h"
+
+int main(int argc, char* argv[]) {
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			yield();
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/ctxswitch/cfa_thrd2.c
===================================================================
--- benchmark/ctxswitch/cfa_thrd2.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/ctxswitch/cfa_thrd2.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,28 @@
+#include <stdio.h>
+#include <thread>
+
+#include "bench.h"
+
+volatile bool done = false;
+
+thread Fibre {};
+
+void main(Fibre & this) {
+	while(!done) {
+		yield();
+	}
+}
+
+int main(int argc, char* argv[]) {
+	Fibre f1;
+  	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			yield();
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+	done = true;
+	return 0;
+}
Index: benchmark/ctxswitch/goroutine.go
===================================================================
--- benchmark/ctxswitch/goroutine.go	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/ctxswitch/goroutine.go	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,33 @@
+package main
+
+import (
+    "fmt"
+    "runtime"
+    "time"
+)
+
+//=======================================
+// time context switch
+//=======================================
+
+var shake chan bool = make( chan bool )
+
+func ContextSwitch(N int) {
+	start := time.Now()
+	for i := 1; i <= N; i += 1 {
+		runtime.Gosched()
+	}
+	end := time.Now()
+	fmt.Printf("%d\n", end.Sub(start) / time.Duration(N))
+	shake <- true   // indicate completion
+}
+
+//=======================================
+// benchmark driver
+//=======================================
+
+func main() {
+	const NoOfTimes = 10000000
+	go ContextSwitch( NoOfTimes )		// context switch
+	<- shake
+}
Index: benchmark/ctxswitch/kos_fibre.cpp
===================================================================
--- benchmark/ctxswitch/kos_fibre.cpp	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/ctxswitch/kos_fibre.cpp	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,14 @@
+#include <libfibre/fibre.h>
+
+#include "bench.h"
+
+int main(int argc, char* argv[]) {
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			Fibre::yield();
+		},
+		result
+	)
+	printf("%llu\n", result);
+	return 0;
+}
Index: benchmark/ctxswitch/kos_fibre2.cpp
===================================================================
--- benchmark/ctxswitch/kos_fibre2.cpp	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/ctxswitch/kos_fibre2.cpp	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,26 @@
+#include <libfibre/fibre.h>
+
+#include "bench.h"
+
+volatile bool done = false;
+
+static void f1main() {
+	while(!done) {
+		Fibre::yield();
+	}
+}
+
+int main(int argc, char* argv[]) {
+	Fibre* f1 = (new Fibre)->run(f1main);
+  	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			Fibre::yield();
+		},
+		result
+	)
+	printf("%llu\n", result);
+	done = true;
+	Fibre::yield();
+	f1->join();
+	return 0;
+}
Index: benchmark/ctxswitch/pthreads.c
===================================================================
--- benchmark/ctxswitch/pthreads.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/ctxswitch/pthreads.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,17 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <sched.h>
+
+#include "bench.h"
+
+int main(int argc, char* argv[]) {
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			sched_yield();
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/ctxswitch/upp_cor.cc
===================================================================
--- benchmark/ctxswitch/upp_cor.cc	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/ctxswitch/upp_cor.cc	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,33 @@
+#include <cstdio>
+
+#include "bench.h"
+
+_Coroutine GreatSuspender {
+public:
+	GreatSuspender() {
+		resume();
+	}
+
+	void do_resume() {
+		resume();
+	}
+private:
+	void main() {
+		while( true ) {
+			suspend();
+		}
+	}
+};
+
+int main(int argc, char* argv[]) {
+	GreatSuspender s;
+
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			s.do_resume();
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/ctxswitch/upp_thrd.cc
===================================================================
--- benchmark/ctxswitch/upp_thrd.cc	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/ctxswitch/upp_thrd.cc	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,14 @@
+#include <cstdio>
+
+#include "bench.h"
+
+int main(int argc, char* argv[]) {
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			uThisTask().yield();
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/fetch_add.c
===================================================================
--- benchmark/fetch_add.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/fetch_add.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,22 @@
+#include <stdio.h>
+
+#include "bench.h"
+
+volatile int value;
+
+void __attribute__((noinline)) do_call() {
+	__atomic_add_fetch( &value, 1, __ATOMIC_SEQ_CST );
+	asm volatile ("");
+	__atomic_sub_fetch( &value, 1, __ATOMIC_SEQ_CST );
+}
+
+int main(int argc, char* argv[]) {
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			do_call();
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/function.c
===================================================================
--- benchmark/function.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/function.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,18 @@
+#include <stdio.h>
+
+#include "bench.h"
+
+void __attribute__((noinline)) do_call() {
+	asm volatile("" ::: "memory");
+}
+
+int main(int argc, char* argv[]) {
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			do_call();
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/interrupt_linux.c
===================================================================
--- benchmark/interrupt_linux.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/interrupt_linux.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,35 @@
+#include <pthread.h>
+#include <stdlib.h>
+#include <signal.h>
+
+#define __CFA_SIGCXT__ ucontext_t *
+#define __CFA_SIGPARMS__ __attribute__((unused)) int sig, __attribute__((unused)) siginfo_t *sfp, __attribute__((unused)) __CFA_SIGCXT__ cxt
+
+void sigHandler( __CFA_SIGPARMS__ ) {
+	sigset_t mask;
+	sigemptyset( &mask );
+	sigaddset( &mask, SIGUSR1 );
+
+	if ( sigprocmask( SIG_UNBLOCK, &mask, NULL ) == -1 ) {
+		abort();
+	} // if
+}
+
+int main() {
+
+	struct sigaction act;
+
+	act.sa_sigaction = (void (*)(int, siginfo_t *, void *))sigHandler;
+	sigemptyset( &act.sa_mask );
+	sigaddset( &act.sa_mask, SIGUSR1 );
+
+	act.sa_flags = SA_SIGINFO;
+
+	if ( sigaction( SIGUSR1, &act, NULL ) == -1 ) {
+		abort();
+	} // if
+
+	for( int i = 0; i < 50000000ul; i++ ) {
+		pthread_kill( pthread_self(), SIGUSR1 );
+	}
+}
Index: benchmark/loop.c
===================================================================
--- benchmark/loop.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/loop.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,14 @@
+#include <stdio.h>
+
+#include "bench.h"
+
+int main(int argc, char* argv[]) {
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			asm volatile("" ::: "memory");
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/mutex/JavaThread.java
===================================================================
--- benchmark/mutex/JavaThread.java	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/mutex/JavaThread.java	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,14 @@
+public class JavaThread {
+	public synchronized void noop() {}
+
+	public static void main(String[] args) {
+		int NoOfTimes = 5000000;
+		JavaThread j = new JavaThread();
+		long start = System.nanoTime();
+		for(int i = 1; i <= NoOfTimes; i += 1) {
+			j.noop();
+		}
+		long end = System.nanoTime();
+		System.out.println( (end - start) / NoOfTimes);
+	}
+}
Index: benchmark/mutex/cfa1.c
===================================================================
--- benchmark/mutex/cfa1.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/mutex/cfa1.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,19 @@
+#include <monitor>
+#include <stdio.h>
+
+#include "bench.h"
+
+monitor M {};
+void __attribute__((noinline)) call( M & mutex m ) {}
+
+int main(int argc, char* argv[]) {
+	M m;
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			call(m);
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/mutex/cfa2.c
===================================================================
--- benchmark/mutex/cfa2.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/mutex/cfa2.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,19 @@
+#include <monitor>
+#include <stdio.h>
+
+#include "bench.h"
+
+monitor M {};
+void __attribute__((noinline)) call( M & mutex m1, M & mutex m2 ) {}
+
+int main(int argc, char* argv[]) {
+	M m1, m2;
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			call(m1, m2);
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/mutex/cfa4.c
===================================================================
--- benchmark/mutex/cfa4.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/mutex/cfa4.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,20 @@
+#include <monitor>
+#include <stdio.h>
+
+#include "bench.h"
+
+
+monitor M {};
+void __attribute__((noinline)) call( M & mutex m1, M & mutex m2, M & mutex m3, M & mutex m4 ) {}
+
+int main(int argc, char* argv[]) {
+	M m1, m2, m3, m4;
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			call(m1, m2, m3, m4);
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/mutex/pthreads.c
===================================================================
--- benchmark/mutex/pthreads.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/mutex/pthreads.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,22 @@
+#include <pthread.h>
+#include <stdio.h>
+
+#include "bench.h"
+
+pthread_mutex_t mutex;
+
+void __attribute__((noinline)) call() {
+	 pthread_mutex_lock  (&mutex);
+	 pthread_mutex_unlock(&mutex);
+}
+
+int main(int argc, char* argv[]) {
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			call();
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/mutex/upp.cc
===================================================================
--- benchmark/mutex/upp.cc	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/mutex/upp.cc	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,20 @@
+#include <cstdio>
+
+#include "bench.h"
+
+_Monitor MyMonitor {
+public:
+	void __attribute__((noinline)) call() {}
+};
+
+int main(int argc, char* argv[]) {
+	MyMonitor m;
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			m.call();
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+}
Index: benchmark/schedext/cfa1.c
===================================================================
--- benchmark/schedext/cfa1.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/schedext/cfa1.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,44 @@
+#include <kernel>
+#include <monitor>
+#include <thread>
+#include <stdio.h>
+
+#include "bench.h"
+
+int argc;
+char** argv;
+volatile int go = 0;
+
+monitor M {};
+M m1;
+
+void __attribute__((noinline)) call( M & mutex a1 ) {}
+
+int  __attribute__((noinline)) wait( M & mutex a1 ) {
+	go = 1;
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			waitfor(call, a1);
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+	go = 0;
+	return 0;
+}
+
+thread T {};
+void ^?{}( T & mutex this ) {}
+void main( T & this ) {
+	while(go == 0) { yield(); }
+	while(go == 1) { call(m1); }
+
+}
+
+int main(int margc, char* margv[]) {
+	argc = margc;
+	argv = margv;
+	T t;
+	return wait(m1);
+}
Index: benchmark/schedext/cfa2.c
===================================================================
--- benchmark/schedext/cfa2.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/schedext/cfa2.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,44 @@
+#include <kernel>
+#include <monitor>
+#include <thread>
+#include <stdio.h>
+
+#include "bench.h"
+
+int argc;
+char** argv;
+volatile int go = 0;
+
+monitor M {};
+M m1, m2;
+
+void __attribute__((noinline)) call( M & mutex a1, M & mutex a2 ) {}
+
+int  __attribute__((noinline)) wait( M & mutex a1, M & mutex a2 ) {
+	go = 1;
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			waitfor(call, a1, a2);
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+	go = 0;
+	return 0;
+}
+
+thread T {};
+void ^?{}( T & mutex this ) {}
+void main( T & this ) {
+	while(go == 0) { yield(); }
+	while(go == 1) { call(m1, m2); }
+
+}
+
+int main(int margc, char* margv[]) {
+	argc = margc;
+	argv = margv;
+	T t;
+	return wait(m1, m2);
+}
Index: benchmark/schedext/cfa4.c
===================================================================
--- benchmark/schedext/cfa4.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/schedext/cfa4.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,44 @@
+#include <kernel>
+#include <monitor>
+#include <thread>
+#include <stdio.h>
+
+#include "bench.h"
+
+int argc;
+char** argv;
+volatile int go = 0;
+
+monitor M {};
+M m1, m2, m3, m4;
+
+void __attribute__((noinline)) call( M & mutex a1, M & mutex a2, M & mutex a3, M & mutex a4 ) {}
+
+int  __attribute__((noinline)) wait( M & mutex a1, M & mutex a2, M & mutex a3, M & mutex a4 ) {
+	go = 1;
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			waitfor(call, a1, a2, a3, a4);
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+	go = 0;
+	return 0;
+}
+
+thread T {};
+void ^?{}( T & mutex this ) {}
+void main( T & this ) {
+	while(go == 0) { yield(); }
+	while(go == 1) { call(m1, m2, m3, m4); }
+
+}
+
+int main(int margc, char* margv[]) {
+	argc = margc;
+	argv = margv;
+	T t;
+	return wait(m1, m2, m3, m4);
+}
Index: benchmark/schedext/upp.cc
===================================================================
--- benchmark/schedext/upp.cc	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/schedext/upp.cc	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,43 @@
+#include <cstdio>
+
+#include "bench.h"
+
+int argc;
+char** argv;
+volatile int go = 0;
+
+_Monitor M {
+public:
+	void __attribute__((noinline)) call() {}
+
+	int __attribute__((noinline)) wait() {
+		go = 1;
+		BENCH(
+			for (size_t i = 0; i < n; i++) {
+				_Accept(call);
+			},
+			result
+		)
+
+		printf("%llu\n", result);
+		go = 0;
+		return 0;
+	}
+};
+
+M m;
+
+_Task T {
+	void main() {
+		while(go == 0) { yield(); }
+		while(go == 1) { m.call(); }
+
+	}
+};
+
+int main(int margc, char* margv[]) {
+	argc = margc;
+	argv = margv;
+	T t;
+	return m.wait();
+}
Index: benchmark/schedint/JavaThread.java
===================================================================
--- benchmark/schedint/JavaThread.java	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/schedint/JavaThread.java	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,42 @@
+class Monitor {
+	public static volatile Boolean go = false;
+}
+
+class Signaller extends Thread {
+	Monitor m;
+	Signaller(Monitor m) {
+		this.m = m;
+	}
+
+	public void run() {
+		Monitor.go = true;
+		while( Monitor.go ) {
+			synchronized(this.m) {
+				this.m.notify();
+			}
+		}
+	}
+}
+
+public class JavaThread {
+	public static void main(String[] args) throws InterruptedException {
+		int NoOfTimes = 50000;
+		Monitor m = new Monitor();
+		long start, end;
+		Signaller s = new Signaller(m);
+		synchronized(m) {
+			s.start();
+			while( !Monitor.go ) {
+				Thread.yield();
+			}
+			start = System.nanoTime();
+			for(int i = 1; i <= NoOfTimes; i += 1) {
+				m.wait();
+			}
+			end = System.nanoTime();
+		}
+		Monitor.go = false;
+		s.join();
+		System.out.println( (end - start) / NoOfTimes);
+	}
+}
Index: benchmark/schedint/cfa1.c
===================================================================
--- benchmark/schedint/cfa1.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/schedint/cfa1.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,47 @@
+#include <kernel>
+#include <monitor>
+#include <thread>
+#include <stdio.h>
+
+#include "bench.h"
+
+int argc;
+char** argv;
+volatile int go = 0;
+
+condition c;
+monitor M {};
+M m1;
+
+void __attribute__((noinline)) call( M & mutex a1 ) {
+	signal(c);
+}
+
+int  __attribute__((noinline)) wait( M & mutex a1 ) {
+	go = 1;
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			wait(c);
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+	go = 0;
+	return 0;
+}
+
+thread T {};
+void ^?{}( T & mutex this ) {}
+void main( T & this ) {
+	while(go == 0) { yield(); }
+	while(go == 1) { call(m1); }
+
+}
+
+int main(int margc, char* margv[]) {
+	argc = margc;
+	argv = margv;
+	T t;
+	return wait(m1);
+}
Index: benchmark/schedint/cfa2.c
===================================================================
--- benchmark/schedint/cfa2.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/schedint/cfa2.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,47 @@
+#include <kernel>
+#include <monitor>
+#include <thread>
+#include <stdio.h>
+
+#include "bench.h"
+
+int argc;
+char** argv;
+volatile int go = 0;
+
+condition c;
+monitor M {};
+M m1, m2;
+
+void __attribute__((noinline)) call( M & mutex a1, M & mutex a2 ) {
+	signal(c);
+}
+
+int  __attribute__((noinline)) wait( M & mutex a1, M & mutex a2 ) {
+	go = 1;
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			wait(c);
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+	go = 0;
+	return 0;
+}
+
+thread T {};
+void ^?{}( T & mutex this ) {}
+void main( T & this ) {
+	while(go == 0) { yield(); }
+	while(go == 1) { call(m1, m2); }
+
+}
+
+int main(int margc, char* margv[]) {
+	argc = margc;
+	argv = margv;
+	T t;
+	return wait(m1, m2);
+}
Index: benchmark/schedint/cfa4.c
===================================================================
--- benchmark/schedint/cfa4.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/schedint/cfa4.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,47 @@
+#include <kernel>
+#include <monitor>
+#include <thread>
+#include <stdio.h>
+
+#include "bench.h"
+
+int argc;
+char** argv;
+volatile int go = 0;
+
+condition c;
+monitor M {};
+M m1, m2, m3, m4;
+
+void __attribute__((noinline)) call( M & mutex a1, M & mutex a2, M & mutex a3, M & mutex a4 ) {
+	signal(c);
+}
+
+int  __attribute__((noinline)) wait( M & mutex a1, M & mutex a2, M & mutex a3, M & mutex a4 ) {
+	go = 1;
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			wait(c);
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+	go = 0;
+	return 0;
+}
+
+thread T {};
+void ^?{}( T & mutex this ) {}
+void main( T & this ) {
+	while(go == 0) { yield(); }
+	while(go == 1) { call(m1, m2, m3, m4); }
+
+}
+
+int main(int margc, char* margv[]) {
+	argc = margc;
+	argv = margv;
+	T t;
+	return wait(m1, m2, m3, m4);
+}
Index: benchmark/schedint/pthreads.c
===================================================================
--- benchmark/schedint/pthreads.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/schedint/pthreads.c	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,55 @@
+#include <pthread.h>
+#include <stdio.h>
+
+#include "bench.h"
+
+int argc;
+char** argv;
+volatile int go = 0;
+
+pthread_cond_t c;
+pthread_mutex_t m;
+
+void __attribute__((noinline)) call() {
+	pthread_mutex_lock(&m);
+	pthread_cond_signal(&c);
+	pthread_mutex_unlock(&m);
+}
+
+int  __attribute__((noinline)) wait() {
+	pthread_mutex_lock(&m);
+	go = 1;
+	BENCH(
+		for (size_t i = 0; i < n; i++) {
+			pthread_cond_wait(&c, &m);
+		},
+		result
+	)
+
+	printf("%llu\n", result);
+	go = 0;
+	pthread_mutex_unlock(&m);
+	return 0;
+}
+
+void* thread_main(void * a) {
+	while(go == 0) { sched_yield(); }
+	while(go == 1) { call(); }
+	return NULL;
+}
+
+int main(int margc, char* margv[]) {
+	argc = margc;
+	argv = margv;
+	pthread_t thread;
+	if (pthread_create(&thread, NULL, thread_main, NULL) < 0) {
+		perror( "failure" );
+		return 1;
+	}
+	wait();
+	if (pthread_join( thread, NULL) < 0) {
+		perror( "failure" );
+		return 1;
+	}
+	return 0;
+}
Index: benchmark/schedint/upp.cc
===================================================================
--- benchmark/schedint/upp.cc	(revision bf71cfdb7285490eee552b461158846f626cc52f)
+++ benchmark/schedint/upp.cc	(revision bf71cfdb7285490eee552b461158846f626cc52f)
@@ -0,0 +1,46 @@
+#include <cstdio>
+
+#include "bench.h"
+
+int argc;
+char** argv;
+volatile int go = 0;
+
+_Monitor M {
+	uCondition cond;
+public:
+	void __attribute__((noinline)) call() {
+		cond.signal();
+	}
+
+	int __attribute__((noinline)) wait() {
+		go = 1;
+		BENCH(
+			for (size_t i = 0; i < n; i++) {
+				cond.wait();
+			},
+			result
+		)
+
+		printf("%llu\n", result);
+		go = 0;
+		return 0;
+	}
+};
+
+M m;
+
+_Task T {
+	void main() {
+		while(go == 0) { yield(); }
+		while(go == 1) { m.call(); }
+
+	}
+};
+
+int main(int margc, char* margv[]) {
+	argc = margc;
+	argv = margv;
+	T t;
+	return m.wait();
+}
