Index: src/libcfa/bits/locks.h
===================================================================
--- src/libcfa/bits/locks.h	(revision 82df4303ac7c4980fa501dbffdb80dd823360d3f)
+++ src/libcfa/bits/locks.h	(revision 9181f1df605f5f078e13252e4068d7734468edf1)
@@ -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 );
 	}
 
Index: src/libcfa/concurrency/kernel.c
===================================================================
--- src/libcfa/concurrency/kernel.c	(revision 82df4303ac7c4980fa501dbffdb80dd823360d3f)
+++ src/libcfa/concurrency/kernel.c	(revision 9181f1df605f5f078e13252e4068d7734468edf1)
@@ -725,4 +725,9 @@
 		thrd->dbg_next = NULL;
 	}
+
+	void __cfaabi_dbg_record(__spinlock_t & this, const char * prev_name) {
+		this.prev_name = prev_name;
+		this.prev_thrd = TL_GET( this_thread );
+	}
 )
 // Local Variables: //
