Index: uspace/lib/c/include/fibril.h
===================================================================
--- uspace/lib/c/include/fibril.h	(revision 417b12c4b159f5e13b17282486b2d915d77eb892)
+++ uspace/lib/c/include/fibril.h	(revision f4057f59dc2ae6d05e70003152cce8b9adde9242)
@@ -48,4 +48,10 @@
 #define FIBRIL_WRITER      2
 
+struct fibril;
+
+typedef struct {
+	struct fibril *owned_by;
+} fibril_owner_info_t;
+
 typedef enum {
 	FIBRIL_PREEMPT,
@@ -68,4 +74,6 @@
 	int retval;
 	int flags;
+
+	fibril_owner_info_t *waits_for;
 } fibril_t;
 
Index: uspace/lib/c/include/fibril_synch.h
===================================================================
--- uspace/lib/c/include/fibril_synch.h	(revision 417b12c4b159f5e13b17282486b2d915d77eb892)
+++ uspace/lib/c/include/fibril_synch.h	(revision f4057f59dc2ae6d05e70003152cce8b9adde9242)
@@ -43,4 +43,5 @@
 
 typedef struct {
+	fibril_owner_info_t oi;		/* Keep this the first thing. */
 	int counter;
 	link_t waiters;
@@ -49,4 +50,7 @@
 #define FIBRIL_MUTEX_INITIALIZER(name) \
 	{ \
+		.oi = { \
+			.owned_by = NULL \
+		}, \
 		.counter = 1, \
 		.waiters = { \
@@ -60,4 +64,5 @@
 
 typedef struct {
+	fibril_owner_info_t oi;	/* Keep this the first thing. */
 	unsigned writers;
 	unsigned readers;
@@ -67,4 +72,7 @@
 #define FIBRIL_RWLOCK_INITIALIZER(name) \
 	{ \
+		.oi = { \
+			.owned_by = NULL \
+		}, \
 		.readers = 0, \
 		.writers = 0, \
