Index: benchmark/mutexStmt/JavaThread.java
===================================================================
--- benchmark/mutexStmt/JavaThread.java	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
+++ benchmark/mutexStmt/JavaThread.java	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
@@ -0,0 +1,64 @@
+public class JavaThread {
+	// 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 ;
+
+	private 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 ;
+	}
+	static int x = 2;
+
+	static private long times = Long.parseLong("100000000");
+
+	public static void helper() throws InterruptedException {
+		JavaThread j = new JavaThread();
+		// Inhibit biased locking ...
+		x = (j.hashCode() ^ System.identityHashCode(j)) | 1 ;
+		for(long i = 1; i <= times; i += 1) {
+			x = nextRandom(x);
+			synchronized( j ) {
+                x = nextRandom( x );
+            }
+		}
+	}
+
+	public static void InnerMain() throws InterruptedException {
+		long start = System.nanoTime();
+		helper();
+		long end = System.nanoTime();
+		System.out.println( (end - start) / times );
+	}
+    
+	public static void main(String[] args) throws InterruptedException {
+		if ( args.length > 1 ) System.exit( 1 );
+		if ( args.length == 1 ) { times = Long.parseLong(args[0]); }
+
+		//for (int n = Integer.parseInt("5"); --n >= 0 ; ) {
+			InnerMain();
+			Thread.sleep(2000);     // 2 seconds
+			x = nextRandom(x);
+		//}
+		if ( x == 0 ) System.out.println(x);
+	}
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: benchmark/mutexStmt/cpp1.cc
===================================================================
--- benchmark/mutexStmt/cpp1.cc	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
+++ benchmark/mutexStmt/cpp1.cc	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
@@ -0,0 +1,21 @@
+#include <cstdio>
+#include <mutex>
+#include "bench.h"
+#include "cppLock.hpp"
+
+cpp_test_spinlock l1;
+
+int main( int argc, char * argv[] ) {
+	BENCH_START()
+	BENCH(
+		for ( size_t i = 0; i < times; i++ ) {
+			std::scoped_lock lock(l1);
+		},
+		result
+	)
+	printf( "%g\n", result );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: benchmark/mutexStmt/cpp2.cc
===================================================================
--- benchmark/mutexStmt/cpp2.cc	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
+++ benchmark/mutexStmt/cpp2.cc	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
@@ -0,0 +1,21 @@
+#include <cstdio>
+#include <mutex>
+#include "bench.h"
+#include "cppLock.hpp"
+
+cpp_test_spinlock l1, l2;
+
+int main( int argc, char * argv[] ) {
+	BENCH_START()
+	BENCH(
+		for ( size_t i = 0; i < times; i++ ) {
+			std::scoped_lock lock(l1, l2);
+		},
+		result
+	)
+	printf( "%g\n", result );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: benchmark/mutexStmt/cpp4.cc
===================================================================
--- benchmark/mutexStmt/cpp4.cc	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
+++ benchmark/mutexStmt/cpp4.cc	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
@@ -0,0 +1,21 @@
+#include <cstdio>
+#include <mutex>
+#include "bench.h"
+#include "cppLock.hpp"
+
+cpp_test_spinlock l1, l2, l3, l4;
+
+int main( int argc, char * argv[] ) {
+	BENCH_START()
+	BENCH(
+		for ( size_t i = 0; i < times; i++ ) {
+			std::scoped_lock lock(l1, l2, l3, l4);
+		},
+		result
+	)
+	printf( "%g\n", result );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: benchmark/mutexStmt/cpp8.cc
===================================================================
--- benchmark/mutexStmt/cpp8.cc	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
+++ benchmark/mutexStmt/cpp8.cc	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
@@ -0,0 +1,21 @@
+#include <cstdio>
+#include <mutex>
+#include "bench.h"
+#include "cppLock.hpp"
+
+cpp_test_spinlock l1, l2, l3, l4, l5, l6, l7, l8;
+
+int main( int argc, char * argv[] ) {
+	BENCH_START()
+	BENCH(
+		for ( size_t i = 0; i < times; i++ ) {
+			std::scoped_lock lock(l1, l2, l3, l4, l5, l6, l7, l8);
+		},
+		result
+	)
+	printf( "%g\n", result );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: benchmark/mutexStmt/cppLock.hpp
===================================================================
--- benchmark/mutexStmt/cppLock.hpp	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
+++ benchmark/mutexStmt/cppLock.hpp	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
@@ -0,0 +1,18 @@
+class cpp_test_spinlock {
+	volatile bool lockBool = 0;
+
+  public:
+	inline void lock() {
+		for ( ;; ) {
+			if ( (this->lockBool == 0) && (__atomic_test_and_set( &this->lockBool, __ATOMIC_ACQUIRE ) == 0) ) break;
+		}
+	}
+
+	inline bool try_lock() {
+		return (this->lockBool == 0) && (__atomic_test_and_set( &this->lockBool, __ATOMIC_ACQUIRE ) == 0);
+	}
+
+	inline void unlock() {
+		__atomic_clear( &this->lockBool, __ATOMIC_RELEASE );
+	}
+};
Index: benchmark/mutexStmt/lock1.cfa
===================================================================
--- benchmark/mutexStmt/lock1.cfa	(revision 180f249d8c08c772b9b9314d1b36dd26f03cd3cb)
+++ benchmark/mutexStmt/lock1.cfa	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
@@ -5,5 +5,5 @@
 #include "bench.h"
 
-single_acquisition_lock l1;
+test_spinlock l1;
 
 int main( int argc, char * argv[] ) {
Index: benchmark/mutexStmt/lock2.cfa
===================================================================
--- benchmark/mutexStmt/lock2.cfa	(revision 180f249d8c08c772b9b9314d1b36dd26f03cd3cb)
+++ benchmark/mutexStmt/lock2.cfa	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
@@ -5,5 +5,5 @@
 #include "bench.h"
 
-single_acquisition_lock l1, l2;
+test_spinlock l1, l2;
 
 int main( int argc, char * argv[] ) {
Index: benchmark/mutexStmt/lock4.cfa
===================================================================
--- benchmark/mutexStmt/lock4.cfa	(revision 180f249d8c08c772b9b9314d1b36dd26f03cd3cb)
+++ benchmark/mutexStmt/lock4.cfa	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
@@ -5,5 +5,5 @@
 #include "bench.h"
 
-single_acquisition_lock l1, l2, l3, l4;
+test_spinlock l1, l2, l3, l4;
 
 int main( int argc, char * argv[] ) {
Index: benchmark/mutexStmt/lock8.cfa
===================================================================
--- benchmark/mutexStmt/lock8.cfa	(revision 180f249d8c08c772b9b9314d1b36dd26f03cd3cb)
+++ benchmark/mutexStmt/lock8.cfa	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
@@ -5,5 +5,5 @@
 #include "bench.h"
 
-single_acquisition_lock l1, l2, l3, l4, l5, l6, l7, l8;
+test_spinlock l1, l2, l3, l4, l5, l6, l7, l8;
 
 int main( int argc, char * argv[] ) {
Index: benchmark/mutexStmt/no_stmt_lock1.cfa
===================================================================
--- benchmark/mutexStmt/no_stmt_lock1.cfa	(revision 180f249d8c08c772b9b9314d1b36dd26f03cd3cb)
+++ benchmark/mutexStmt/no_stmt_lock1.cfa	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
@@ -5,5 +5,5 @@
 #include "bench.h"
 
-single_acquisition_lock l1;
+test_spinlock l1;
 
 int main( int argc, char * argv[] ) {
Index: benchmark/mutexStmt/no_stmt_lock2.cfa
===================================================================
--- benchmark/mutexStmt/no_stmt_lock2.cfa	(revision 180f249d8c08c772b9b9314d1b36dd26f03cd3cb)
+++ benchmark/mutexStmt/no_stmt_lock2.cfa	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
@@ -5,5 +5,5 @@
 #include "bench.h"
 
-single_acquisition_lock l1, l2;
+test_spinlock l1, l2;
 
 int main( int argc, char * argv[] ) {
Index: benchmark/mutexStmt/no_stmt_lock4.cfa
===================================================================
--- benchmark/mutexStmt/no_stmt_lock4.cfa	(revision 180f249d8c08c772b9b9314d1b36dd26f03cd3cb)
+++ benchmark/mutexStmt/no_stmt_lock4.cfa	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
@@ -5,5 +5,5 @@
 #include "bench.h"
 
-single_acquisition_lock l1, l2, l3, l4;
+test_spinlock l1, l2, l3, l4;
 
 int main( int argc, char * argv[] ) {
Index: benchmark/mutexStmt/no_stmt_lock8.cfa
===================================================================
--- benchmark/mutexStmt/no_stmt_lock8.cfa	(revision 180f249d8c08c772b9b9314d1b36dd26f03cd3cb)
+++ benchmark/mutexStmt/no_stmt_lock8.cfa	(revision a5d1fe752ccee8b0ce0b7ff75dff6c7e0de50ca9)
@@ -5,5 +5,5 @@
 #include "bench.h"
 
-single_acquisition_lock l1, l2, l3, l4, l5, l6, l7, l8;
+test_spinlock l1, l2, l3, l4, l5, l6, l7, l8;
 
 int main( int argc, char * argv[] ) {
