Index: doc/proposals/concurrency/.gitignore
===================================================================
--- doc/proposals/concurrency/.gitignore	(revision 6dfa2e18c3f05e78bc92b5bb4ce65ed347db0442)
+++ doc/proposals/concurrency/.gitignore	(revision 05a0ff23aca6d32e0b0db5cd7194597d485dd0d9)
@@ -24,4 +24,6 @@
 build/*.toc
 *.pdf
+*.png
+figures/*.tex
 
 examples
Index: doc/proposals/concurrency/Makefile
===================================================================
--- doc/proposals/concurrency/Makefile	(revision 6dfa2e18c3f05e78bc92b5bb4ce65ed347db0442)
+++ doc/proposals/concurrency/Makefile	(revision 05a0ff23aca6d32e0b0db5cd7194597d485dd0d9)
@@ -75,4 +75,6 @@
 	build/*.tex     \
 	build/*.toc     \
+	figures/*.tex   \
+	*.png           \
 
 
@@ -117,4 +119,24 @@
 	fig2dev -L pstex_t -p $@ $< > $@_t
 
+figures/%.tex: build/%.pstex
+	echo -n 	"\documentclass[preview]{standalone}\n" 	\
+			"\usepackage[T1]{fontenc}\n" 			\
+			"\usepackage[usenames]{color}\n" 		\
+			"\usepackage{graphicx}\n" 			\
+			"\usepackage{listings}\n" 			\
+			"\usepackage{xspace}\n" 			\
+			"\input{style}\n" 				\
+			"\\\\begin{document}\n"				\
+			"{\\\\resizebox{3\\\\textwidth}{!}{\input{${basename ${notdir $@}}.pstex_t}}}\n" \
+			"\end{document}" > $@
+
+%.png : build/%.pstex figures/%.tex
+	echo ${basename $@}
+	${LaTeX} figures/${basename $@}.tex
+	dvips build/${basename $@}.dvi -o build/${basename $@}.ps
+	ps2pdf build/${basename $@}.ps
+	convert -negate ${basename $@}.pdf $@
+
+
 
 # Local Variables: #
Index: doc/proposals/concurrency/figures/system.fig
===================================================================
--- doc/proposals/concurrency/figures/system.fig	(revision 6dfa2e18c3f05e78bc92b5bb4ce65ed347db0442)
+++ doc/proposals/concurrency/figures/system.fig	(revision 05a0ff23aca6d32e0b0db5cd7194597d485dd0d9)
@@ -93,4 +93,29 @@
 4 0 0 50 -1 0 11 0.0000 2 120 570 4125 7126 thread 4\001
 -6
+6 6975 4050 9525 7875
+2 2 0 1 0 7 50 -1 -1 0.000 0 1 -1 0 0 5
+	 7125 5400 7575 5400 7575 5850 7125 5850 7125 5400
+2 2 0 1 0 7 50 -1 18 0.000 0 1 -1 0 0 5
+	 7125 4200 7575 4200 7575 4650 7125 4650 7125 4200
+2 2 0 1 0 7 50 -1 45 0.000 0 1 -1 0 0 5
+	 7125 4800 7575 4800 7575 5250 7125 5250 7125 4800
+2 2 0 1 0 7 50 -1 -1 0.000 0 1 -1 0 0 5
+	 6975 4050 9525 4050 9525 7875 6975 7875 6975 4050
+3 2 0 2 0 7 49 -1 -1 0.000 1 0 0 10
+	 7350 6900 7500 6975 7200 7050 7500 7125 7200 7200 7500 7275
+	 7200 7350 7500 7425 7200 7500 7350 7575
+	 0.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000
+	 -1.000 0.000
+3 2 0 4 0 7 49 -1 -1 0.000 1 0 0 10
+	 7350 6000 7500 6075 7200 6150 7500 6225 7200 6300 7500 6375
+	 7200 6450 7500 6525 7200 6600 7350 6675
+	 0.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000
+	 -1.000 0.000
+4 0 0 50 -1 0 11 0.0000 2 120 945 7725 4500 Pthread stack\001
+4 0 0 50 -1 0 11 0.0000 2 150 1530 7725 5100 Pthread stack (stolen)\001
+4 0 0 50 -1 0 11 0.0000 2 120 540 7725 6375 Pthread\001
+4 0 0 50 -1 0 11 0.0000 2 150 1065 7725 7275 $\\CFA$ thread\001
+4 0 0 50 -1 0 11 0.0000 2 150 990 7725 5700 $\\CFA$ stack\001
+-6
 1 2 0 1 0 7 50 -1 -1 0.000 1 3.1416 3150 5250 750 450 2400 4800 3900 5700
 2 1 0 1 0 7 50 -1 -1 0.000 0 1 -1 0 0 2
@@ -100,8 +125,4 @@
 2 1 0 1 0 7 50 -1 -1 0.000 0 1 -1 0 0 2
 	 5550 3900 3825 5025
-2 2 0 1 0 7 50 -1 -1 0.000 0 1 -1 0 0 5
-	 7125 3525 7575 3525 7575 3975 7125 3975 7125 3525
-2 2 0 1 0 7 50 -1 -1 0.000 0 1 -1 0 0 5
-	 6975 2175 9525 2175 9525 6000 6975 6000 6975 2175
 2 1 0 1 0 7 50 -1 -1 0.000 0 1 -1 0 0 2
 	 900 6225 2400 5400
@@ -122,8 +143,4 @@
 2 2 0 1 0 7 50 -1 45 0.000 0 1 -1 0 0 5
 	 5100 975 5850 975 5850 2625 5100 2625 5100 975
-2 2 0 1 0 7 50 -1 18 0.000 0 1 -1 0 0 5
-	 7125 2325 7575 2325 7575 2775 7125 2775 7125 2325
-2 2 0 1 0 7 50 -1 45 0.000 0 1 -1 0 0 5
-	 7125 2925 7575 2925 7575 3375 7125 3375 7125 2925
 2 2 0 1 0 7 50 -1 45 0.000 0 1 -1 0 0 5
 	 525 7425 1275 7425 1275 9075 525 9075 525 7425
@@ -143,22 +160,7 @@
 2 2 0 1 0 7 50 -1 18 0.000 0 1 -1 0 0 5
 	 2025 2625 2775 2625 2775 975 2025 975 2025 2625
-3 2 0 2 0 7 49 -1 -1 0.000 1 0 0 10
-	 7350 5025 7500 5100 7200 5175 7500 5250 7200 5325 7500 5400
-	 7200 5475 7500 5550 7200 5625 7350 5700
-	 0.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000
-	 -1.000 0.000
-3 2 0 4 0 7 49 -1 -1 0.000 1 0 0 10
-	 7350 4125 7500 4200 7200 4275 7500 4350 7200 4425 7500 4500
-	 7200 4575 7500 4650 7200 4725 7350 4800
-	 0.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000
-	 -1.000 0.000
 4 0 0 50 -1 0 18 0.0000 2 30 225 4500 3150 ...\001
 4 0 0 50 -1 0 18 0.0000 2 30 225 3750 4500 ...\001
 4 0 0 50 -1 0 11 0.0000 2 120 705 2775 5325 Scheduler\001
-4 0 0 50 -1 0 11 0.0000 2 120 945 7725 2625 Pthread stack\001
-4 0 0 50 -1 0 11 0.0000 2 150 1530 7725 3225 Pthread stack (stolen)\001
-4 0 0 50 -1 0 11 0.0000 2 120 540 7725 4500 Pthread\001
-4 0 0 50 -1 0 11 0.0000 2 150 1065 7725 5400 $\\CFA$ thread\001
 4 0 0 50 -1 0 18 0.0000 2 30 225 4950 6600 ...\001
 4 0 0 50 -1 0 18 0.0000 2 30 225 4200 5850 ...\001
-4 0 0 50 -1 0 11 0.0000 2 150 990 7725 3825 $\\CFA$ stack\001
Index: src/benchmark/Makefile.am
===================================================================
--- src/benchmark/Makefile.am	(revision 6dfa2e18c3f05e78bc92b5bb4ce65ed347db0442)
+++ src/benchmark/Makefile.am	(revision 05a0ff23aca6d32e0b0db5cd7194597d485dd0d9)
@@ -59,8 +59,4 @@
 	@echo -e '\t"githash": "'${githash}'",'
 	@echo -e '\t"arch": "'   ${arch}   '",'
-	@echo -e '\t"compile": {'
-	@+make compile TIME_FORMAT='%e,' PRINT_FORMAT='\t\t\"%s\" :'
-	@echo -e '\t\t"dummy" : {}'
-	@echo -e '\t},'
 	@echo -e '\t"ctxswitch": {'
 	@echo -en '\t\t"coroutine":'
@@ -162,4 +158,5 @@
 ## =========================================================================================================
 signal$(EXEEXT) :\
+	signal-pthread_cond.run \
 	signal-upp.run		\
 	signal-cfa1.run		\
@@ -168,4 +165,7 @@
 	signal-java_thread.run
 
+signal-pthread_cond$(EXEEXT):
+	@@BACKEND_CC@ schedint/pthreads.c -DBENCH_N=500000      -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
 signal-upp$(EXEEXT):
 	@u++          schedint/upp.cc     -DBENCH_N=5000000     -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
@@ -198,5 +198,5 @@
 
 waitfor-cfa1$(EXEEXT):
-	@${CC}        schedext/cfa1.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	${CC}        schedext/cfa1.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
 
 waitfor-cfa2$(EXEEXT):
Index: src/benchmark/Makefile.in
===================================================================
--- src/benchmark/Makefile.in	(revision 6dfa2e18c3f05e78bc92b5bb4ce65ed347db0442)
+++ src/benchmark/Makefile.in	(revision 05a0ff23aca6d32e0b0db5cd7194597d485dd0d9)
@@ -473,8 +473,4 @@
 	@echo -e '\t"githash": "'${githash}'",'
 	@echo -e '\t"arch": "'   ${arch}   '",'
-	@echo -e '\t"compile": {'
-	@+make compile TIME_FORMAT='%e,' PRINT_FORMAT='\t\t\"%s\" :'
-	@echo -e '\t\t"dummy" : {}'
-	@echo -e '\t},'
 	@echo -e '\t"ctxswitch": {'
 	@echo -en '\t\t"coroutine":'
@@ -573,4 +569,5 @@
 
 signal$(EXEEXT) :\
+	signal-pthread_cond.run \
 	signal-upp.run		\
 	signal-cfa1.run		\
@@ -579,4 +576,7 @@
 	signal-java_thread.run
 
+signal-pthread_cond$(EXEEXT):
+	@@BACKEND_CC@ schedint/pthreads.c -DBENCH_N=500000      -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+
 signal-upp$(EXEEXT):
 	@u++          schedint/upp.cc     -DBENCH_N=5000000     -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
@@ -607,5 +607,5 @@
 
 waitfor-cfa1$(EXEEXT):
-	@${CC}        schedext/cfa1.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	${CC}        schedext/cfa1.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
 
 waitfor-cfa2$(EXEEXT):
Index: src/benchmark/schedint/pthreads.c
===================================================================
--- src/benchmark/schedint/pthreads.c	(revision 05a0ff23aca6d32e0b0db5cd7194597d485dd0d9)
+++ src/benchmark/schedint/pthreads.c	(revision 05a0ff23aca6d32e0b0db5cd7194597d485dd0d9)
@@ -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;
+}
