Index: uspace/lib/c/include/fibril_synch.h
===================================================================
--- uspace/lib/c/include/fibril_synch.h	(revision a7a85d16a8c965959d2a721c191833e692d098ed)
+++ uspace/lib/c/include/fibril_synch.h	(revision 668f8cbff72b222492a3db956029fe7d751ab4af)
@@ -43,4 +43,9 @@
 
 typedef struct {
+	fibril_t *owned_by;
+} fibril_owner_info_t;
+
+typedef struct {
+	fibril_owner_info_t oi;		/* Keep this the first thing. */
 	int counter;
 	link_t waiters;
@@ -49,4 +54,7 @@
 #define FIBRIL_MUTEX_INITIALIZER(name) \
 	{ \
+		.oi = { \
+			.owned_by = NULL \
+		}, \
 		.counter = 1, \
 		.waiters = { \
@@ -60,4 +68,5 @@
 
 typedef struct {
+	fibril_owner_info_t oi;	/* Keep this the first thing. */
 	unsigned writers;
 	unsigned readers;
@@ -67,4 +76,7 @@
 #define FIBRIL_RWLOCK_INITIALIZER(name) \
 	{ \
+		.oi = { \
+			.owned_by = NULL \
+		}, \
 		.readers = 0, \
 		.writers = 0, \
