Index: src/libcfa/bits/locks.h
===================================================================
--- src/libcfa/bits/locks.h	(revision 8ad653339f39e704e4be3cbd354de857c44a52f4)
+++ src/libcfa/bits/locks.h	(revision e6d39feba42a3135889973bd6f83370efbb652db)
@@ -69,4 +69,11 @@
 	}
 
+
+	#ifdef __CFA_DEBUG__
+		void __cfaabi_dbg_record(__spinlock_t & this, const char * prev_name);
+	#else
+		#define __cfaabi_dbg_record(x, y)
+	#endif
+
 	// Lock the spinlock, return false if already acquired
 	static inline _Bool try_lock  ( __spinlock_t & this __cfaabi_dbg_ctx_param2 ) {
@@ -74,8 +81,5 @@
 		if( result ) {
 			disable_interrupts();
-			// __cfaabi_dbg_debug_do(
-			// 	this.prev_name = caller;
-			// 	this.prev_thrd = TL_GET( this_thread );
-			// )
+			__cfaabi_dbg_record( this, caller );
 		}
 		return result;
@@ -105,8 +109,5 @@
 		}
 		disable_interrupts();
-		// __cfaabi_dbg_debug_do(
-		// 	this.prev_name = caller;
-		// 	this.prev_thrd = TL_GET( this_thread );
-		// )
+		__cfaabi_dbg_record( this, caller );
 	}
 
