Index: src/benchmark/Makefile.am
===================================================================
--- src/benchmark/Makefile.am	(revision 8d722ccd70892f5a8493fa5275330663ce8fb632)
+++ src/benchmark/Makefile.am	(revision af58ee0200ad1b540710d20aa788ec2065978484)
@@ -48,4 +48,13 @@
 	@rm -f a.out .result.log
 
+ctxswitch-pthread$(EXEEXT):
+	@BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -lrt -pthread -DN=50000000 PthrdCtxSwitch.c
+	@rm -f .result.log
+	@for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
+                ./a.out | tee -a .result.log ; \
+        done
+	@./stat.py .result.log
+	@rm -f a.out .result.log
+
 sched-int$(EXEEXT):
 	${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 SchedInt.c
Index: src/benchmark/Makefile.in
===================================================================
--- src/benchmark/Makefile.in	(revision 8d722ccd70892f5a8493fa5275330663ce8fb632)
+++ src/benchmark/Makefile.in	(revision af58ee0200ad1b540710d20aa788ec2065978484)
@@ -598,4 +598,13 @@
 	@rm -f a.out .result.log
 
+ctxswitch-pthread$(EXEEXT):
+	@BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -lrt -pthread -DN=50000000 PthrdCtxSwitch.c
+	@rm -f .result.log
+	@for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
+                ./a.out | tee -a .result.log ; \
+        done
+	@./stat.py .result.log
+	@rm -f a.out .result.log
+
 sched-int$(EXEEXT):
 	${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 SchedInt.c
Index: src/benchmark/PthrdCtxSwitch.c
===================================================================
--- src/benchmark/PthrdCtxSwitch.c	(revision af58ee0200ad1b540710d20aa788ec2065978484)
+++ src/benchmark/PthrdCtxSwitch.c	(revision af58ee0200ad1b540710d20aa788ec2065978484)
@@ -0,0 +1,19 @@
+#include <stdio.h>
+#include <stdlib.h>
+#define _GNU_SOURCE
+#include <pthread.h>
+
+#include "bench.h"
+
+int main() {
+	const unsigned int NoOfTimes = N;
+	long long int StartTime, EndTime;
+
+	StartTime = Time();
+	for ( volatile unsigned int i = 0; i < NoOfTimes; i += 1 ) {
+		pthread_yield();
+	}
+	EndTime = Time();
+
+	printf("%lld\n", ( EndTime - StartTime ) / NoOfTimes );
+}
Index: src/benchmark/bench.h
===================================================================
--- src/benchmark/bench.h	(revision 8d722ccd70892f5a8493fa5275330663ce8fb632)
+++ src/benchmark/bench.h	(revision af58ee0200ad1b540710d20aa788ec2065978484)
@@ -1,12 +1,16 @@
 #pragma once
 
+#ifdef __CFORALL__
 extern "C" {
+#endif
 	#include <unistd.h>					// sysconf
 	#include <sys/times.h>					// times
 	#include <time.h>
+#ifdef __CFORALL__
 }
+#endif
 
 inline unsigned long long int Time() {
-    timespec ts;
+    struct timespec ts;
     clock_gettime(
 #if defined( __linux__ )
Index: src/benchmark/create_cfaThrd.c
===================================================================
--- src/benchmark/create_cfaThrd.c	(revision 8d722ccd70892f5a8493fa5275330663ce8fb632)
+++ src/benchmark/create_cfaThrd.c	(revision af58ee0200ad1b540710d20aa788ec2065978484)
@@ -4,5 +4,5 @@
 
 thread MyThread {};
-void main(MyThread * this) {}
+void main(MyThread & this) {}
 
 int main(int argc, char* argv[]) {
