Index: benchmark/mutexC/JavaThread.java
===================================================================
--- benchmark/mutexC/JavaThread.java	(revision 51493a40bf5cb6d9a0eacd5514b1f7618acccfbe)
+++ benchmark/mutexC/JavaThread.java	(revision 51493a40bf5cb6d9a0eacd5514b1f7618acccfbe)
@@ -0,0 +1,89 @@
+class Noop {
+	// Simplistic low-quality Marsaglia Shift-XOR pseudo-random number generator.
+	// Bijective   
+	// Cycle length for non-zero values is 4G-1.
+	// 0 is absorbing and should be avoided -- fixed point.
+	// The returned value is typically masked to produce a positive value.
+	static volatile int Ticket = 0 ; 
+
+	public static int nextRandom( int x ) {
+		if (x == 0) { 
+			// reseed the PRNG
+			// Ticket is accessed infrequently and does not constitute a coherence hot-spot. 
+			// Note that we use a non-atomic racy increment -- the race is rare and benign. 
+			// If the race is a concern switch to an AtomicInteger.  
+			// In addition accesses to the RW volatile global "Ticket"  variable are not 
+			// (readily) predictable at compile-time so the JIT will not be able to elide 
+			// nextRandom() invocations.  
+			x = ++Ticket ; 
+			if (x == 0) x = 1 ; 
+		}
+		x ^= x << 6;
+		x ^= x >>> 21;
+		x ^= x << 7;
+		return x ;   
+	}
+}
+class Monitor {
+	private int x;
+	public volatile Boolean go = false;
+	public volatile Boolean go2 = false;
+	public synchronized void call() {
+		if ( x == 0 ) System.out.println(x);
+		x = Noop.nextRandom( x );
+	}
+	Monitor() { x = Noop.nextRandom( x ); }
+}
+class T extends Thread {
+	Monitor m;
+	public void run() {
+		m.go2 = true;
+		while ( ! m.go );
+		while ( m.go ) { m.call(); }
+	}
+	T( Monitor m ) { this.m = m; }
+}
+public class JavaThread {
+	static int x = 2;
+
+	static private int times = Integer.parseInt("10000000");
+
+	public static void call( Monitor m ) throws InterruptedException {
+		x = Noop.nextRandom( x );
+		m.go = true;
+		//while ( ! m.go2 );
+		for ( int i = 0; i < times; i += 1 ) {
+			m.call();
+			x = Noop.nextRandom( x );
+		}
+		m.go = false;
+	}
+	public static void InnerMain() throws InterruptedException {
+		Monitor m = new Monitor();
+		T t = new T( m );
+		t.start();
+		long start = System.nanoTime();
+		call( m );
+		long end = System.nanoTime();
+		System.out.println( (end - start) / times );
+		t.join();
+	}
+	public static void main( String[] args ) throws InterruptedException {
+		if ( args.length > 2 ) System.exit( 1 );
+		if ( args.length == 2 ) { times = Integer.parseInt(args[1]); }
+
+		if ( args.length > 2 ) System.exit( 1 );
+		if ( args.length == 2 ) { times = Integer.parseInt(args[1]); }
+
+		for ( int i = Integer.parseInt("5"); --i >= 0 ; ) { 
+			InnerMain();
+			// Thread.sleep(2000);	// 2 seconds
+			x = Noop.nextRandom( x );
+		}
+		if ( x == 0 ) System.out.println(x);
+	}
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: benchmark/mutexC/cfa1.cfa
===================================================================
--- benchmark/mutexC/cfa1.cfa	(revision 51493a40bf5cb6d9a0eacd5514b1f7618acccfbe)
+++ benchmark/mutexC/cfa1.cfa	(revision 51493a40bf5cb6d9a0eacd5514b1f7618acccfbe)
@@ -0,0 +1,36 @@
+#include <thread.hfa>
+#include <monitor.hfa>
+
+#include "../bench.h"
+
+monitor M {} m;
+void __attribute__((noinline)) call( M & mutex ) {}
+
+volatile bool go = false;
+
+void call() {
+	go = true;
+	for ( i; times ) {
+		call( m );
+	}
+	go = false;
+}
+thread T {};
+void main( T & ) {
+	while ( ! go );
+	while ( go ) { call( m ); }
+}
+int main( int argc, char * argv[] ) {
+	BENCH_START()
+	processor p;
+	T t;
+	BENCH(
+		call(),
+		result
+	)
+	printf( "%g\n", result );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: benchmark/mutexC/cfa2.cfa
===================================================================
--- benchmark/mutexC/cfa2.cfa	(revision 51493a40bf5cb6d9a0eacd5514b1f7618acccfbe)
+++ benchmark/mutexC/cfa2.cfa	(revision 51493a40bf5cb6d9a0eacd5514b1f7618acccfbe)
@@ -0,0 +1,35 @@
+#include <thread.hfa>
+#include <monitor.hfa>
+
+#include "../bench.h"
+
+monitor M {} m1, m2;
+void __attribute__((noinline)) call( M & mutex m1, M & mutex m2 ) {}
+
+volatile bool go = false;
+
+void call() {
+	go = true;
+	for ( i; times ) {
+		call( m1, m2 );
+	}
+	go = false;
+}
+thread T {};
+void main( T & this ) {
+	while ( ! go );
+	while ( go ) { call( m1, m2 ); }
+}
+int main( int argc, char * argv[] ) {
+	BENCH_START()
+	T t;
+	BENCH(
+		call( m1, m2 ),
+		result
+	)
+	printf( "%g\n", result );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: benchmark/mutexC/cfa4.cfa
===================================================================
--- benchmark/mutexC/cfa4.cfa	(revision 51493a40bf5cb6d9a0eacd5514b1f7618acccfbe)
+++ benchmark/mutexC/cfa4.cfa	(revision 51493a40bf5cb6d9a0eacd5514b1f7618acccfbe)
@@ -0,0 +1,35 @@
+#include <thread.hfa>
+#include <monitor.hfa>
+
+#include "../bench.h"
+
+monitor M {} m1, m2, m3, m4;
+void __attribute__((noinline)) call( M & mutex m1, M & mutex m2, M & mutex m3, M & mutex m4 ) {}
+
+volatile bool go = false;
+
+void call() {
+	go = true;
+	for ( i; times ) {
+		call( m1, m2, m3, m4 );
+	}
+	go = false;
+}
+thread T {};
+void main( T & this ) {
+	while ( ! go );
+	while ( go ) { call( m1, m2, m3, m4 ); }
+}
+int main( int argc, char * argv[] ) {
+	BENCH_START()
+	T t;
+	BENCH(
+		call( m1, m2 ),
+		result
+	)
+	printf( "%g\n", result );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: benchmark/mutexC/pthreads.c
===================================================================
--- benchmark/mutexC/pthreads.c	(revision 51493a40bf5cb6d9a0eacd5514b1f7618acccfbe)
+++ benchmark/mutexC/pthreads.c	(revision 51493a40bf5cb6d9a0eacd5514b1f7618acccfbe)
@@ -0,0 +1,47 @@
+#include <pthread.h>
+#include <stdio.h>
+#include <stdbool.h>
+
+#include "../bench.h"
+
+pthread_mutex_t mutex;
+
+volatile bool go = false;
+
+void call() {
+	go = true;
+	for ( size_t i = 0; i < times; i += 1 ) {
+		pthread_mutex_lock( &mutex );
+		pthread_mutex_unlock( &mutex );
+	}
+	go = false;
+}
+void * thread_main( __attribute__((unused)) void * arg ) {
+	while ( ! go );
+	while ( go ) {
+		pthread_mutex_lock( &mutex );
+		pthread_mutex_unlock( &mutex );
+	}
+	return NULL;
+}
+int main( int argc, char * argv[] ) {
+	BENCH_START()
+	pthread_t thread;
+	if ( pthread_create( &thread, NULL, thread_main, NULL ) < 0 ) {
+		perror( "failure" );
+		return EXIT_FAILURE;
+	}
+	BENCH(
+		call(),
+		result
+	)
+	printf( "%g\n", result );
+	if ( pthread_join( thread, NULL ) < 0 ) {
+		perror( "failure" );
+		return EXIT_FAILURE;
+	}
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: benchmark/mutexC/rust.rs
===================================================================
--- benchmark/mutexC/rust.rs	(revision 51493a40bf5cb6d9a0eacd5514b1f7618acccfbe)
+++ benchmark/mutexC/rust.rs	(revision 51493a40bf5cb6d9a0eacd5514b1f7618acccfbe)
@@ -0,0 +1,26 @@
+use std::env;
+use std::process;
+use std::sync::Mutex;
+use std::time::Instant;
+
+fn call( lock : & Mutex<u32> ) {
+	let _ = lock.lock();
+}
+
+fn main() {
+	let mut times : u32 = 50000000;
+	let args: Vec<String> = env::args().collect();
+	if args.len() > 2 { process::exit( 1 ); }
+	if args.len() == 2 { times = args[1].parse().unwrap(); }
+
+	let lock = Mutex::new(0);
+
+	let start = Instant::now();
+	for _ in 1..times {
+		call( &lock );
+	}
+	let duration = start.elapsed() / times;
+	println!( "{:?}", duration.as_nanos() )
+}
+
+// rustc -C opt-level=3 rust.rs
Index: benchmark/mutexC/upp.cc
===================================================================
--- benchmark/mutexC/upp.cc	(revision 51493a40bf5cb6d9a0eacd5514b1f7618acccfbe)
+++ benchmark/mutexC/upp.cc	(revision 51493a40bf5cb6d9a0eacd5514b1f7618acccfbe)
@@ -0,0 +1,38 @@
+#include <cstdio>
+
+#include "../bench.h"
+
+_Monitor MyMonitor {
+  public:
+	void __attribute__((noinline)) call() {}
+} m;
+
+volatile bool go = false;
+
+void call() {
+	go = true;
+	for ( size_t i = 0; i < times; i += 1 ) {
+		m.call();
+	}
+	go = false;
+}
+_Task T {
+	void main() {
+		while ( ! go );
+		while ( go ) { m.call(); }
+	}
+};
+int main( int argc, char * argv[] ) {
+	BENCH_START()
+	uProcessor p;
+	T t;
+	BENCH(
+		call(),
+		result
+	)
+	printf( "%g\n", result );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
