Index: benchmark/basic/fetch_add.c
===================================================================
--- benchmark/basic/fetch_add.c	(revision b4107c815918e9d1300f3381d29c2a863abf7de8)
+++ benchmark/basic/fetch_add.c	(revision b4107c815918e9d1300f3381d29c2a863abf7de8)
@@ -0,0 +1,26 @@
+#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_START()
+	BENCH(
+		for (size_t i = 0; i < times; i++) {
+			do_call();
+		},
+		result
+	)
+	printf( "%g\n", result );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: benchmark/basic/function.c
===================================================================
--- benchmark/basic/function.c	(revision b4107c815918e9d1300f3381d29c2a863abf7de8)
+++ benchmark/basic/function.c	(revision b4107c815918e9d1300f3381d29c2a863abf7de8)
@@ -0,0 +1,22 @@
+#include <stdio.h>
+
+#include "bench.h"
+
+void __attribute__((noinline)) do_call() {
+	asm volatile("" ::: "memory");
+}
+
+int main( int argc, char * argv[] ) {
+	BENCH_START()
+	BENCH(
+		for (size_t i = 0; i < times; i++) {
+			do_call();
+		},
+		result
+	)
+	printf( "%g\n", result );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: benchmark/basic/loop.c
===================================================================
--- benchmark/basic/loop.c	(revision b4107c815918e9d1300f3381d29c2a863abf7de8)
+++ benchmark/basic/loop.c	(revision b4107c815918e9d1300f3381d29c2a863abf7de8)
@@ -0,0 +1,18 @@
+#include <stdio.h>
+
+#include "bench.h"
+
+int main( int argc, char * argv[] ) {
+	BENCH_START()
+	BENCH(
+		for (size_t i = 0; i < times; i++) {
+			asm volatile( "" ::: "memory" );
+		},
+		result
+	)
+	printf( "%g\n", result );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: benchmark/basic/tls_fetch_add.c
===================================================================
--- benchmark/basic/tls_fetch_add.c	(revision b4107c815918e9d1300f3381d29c2a863abf7de8)
+++ benchmark/basic/tls_fetch_add.c	(revision b4107c815918e9d1300f3381d29c2a863abf7de8)
@@ -0,0 +1,31 @@
+#include <stdbool.h>
+#include <stdio.h>
+
+#include "bench.h"
+
+#define thread_local _Thread_local
+
+thread_local volatile bool value;
+
+void __attribute__((noinline)) do_call() {
+	__atomic_store_n( &value, true, __ATOMIC_RELAXED );
+	__atomic_signal_fence(__ATOMIC_ACQUIRE);
+	asm volatile ("");
+	__atomic_store_n( &value, false, __ATOMIC_RELAXED );
+	__atomic_signal_fence(__ATOMIC_RELEASE);
+}
+
+int main( int argc, char * argv[] ) {
+	BENCH_START()
+	BENCH(
+		for (size_t i = 0; i < times; i++) {
+			do_call();
+		},
+		result
+	)
+	printf( "%g\n", result );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: benchmark/basic/ttst_lock.c
===================================================================
--- benchmark/basic/ttst_lock.c	(revision b4107c815918e9d1300f3381d29c2a863abf7de8)
+++ benchmark/basic/ttst_lock.c	(revision b4107c815918e9d1300f3381d29c2a863abf7de8)
@@ -0,0 +1,50 @@
+#include <stdio.h>
+#include <stdint.h>										// uintptr_t
+
+#include "bench.h"
+
+#define CALIGN __attribute__(( aligned (CACHE_ALIGN) ))
+#define CACHE_ALIGN 128
+#define Pause() __asm__ __volatile__ ( "pause" : : : )
+
+typedef uintptr_t TYPE;									// addressable word-size
+static volatile TYPE lock __attribute__(( aligned (128) )); // Intel recommendation
+static TYPE PAD CALIGN __attribute__(( unused ));		// protect further false sharing
+
+static inline void spin_lock( volatile TYPE *lock ) {
+	enum { SPIN_START = 4, SPIN_END = 64 * 1024, };
+	unsigned int spin = SPIN_START;
+
+	for ( unsigned int i = 1;; i += 1 ) {
+	  if ( *lock == 0 && __atomic_test_and_set( lock, __ATOMIC_ACQUIRE ) == 0 ) break;
+		for ( volatile unsigned int s = 0; s < spin; s += 1 ) Pause(); // exponential spin
+		//spin += spin;									// powers of 2
+		if ( i % 64 == 0 ) spin += spin;				// slowly increase by powers of 2
+		if ( spin > SPIN_END ) spin = SPIN_START;		// prevent overflow
+	} // for
+} // spin_lock
+
+static inline void spin_unlock( volatile TYPE *lock ) {
+	__atomic_clear( lock, __ATOMIC_RELEASE );
+} // spin_unlock
+
+void __attribute__((noinline)) do_call() {
+	spin_lock( &lock );
+//	asm volatile ("");
+	spin_unlock( &lock );
+}
+
+int main( int argc, char * argv[] ) {
+	BENCH_START()
+	BENCH(
+		for (size_t i = 0; i < times; i++) {
+			do_call();
+		},
+		result
+	)
+	printf( "%g\n", result );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
