Index: uspace/lib/c/arch/abs32le/include/fibril.h
===================================================================
--- uspace/lib/c/arch/abs32le/include/fibril.h	(revision e503d3a91732d66c7e65daa54068b5868679fa30)
+++ uspace/lib/c/arch/abs32le/include/fibril.h	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
@@ -44,5 +44,4 @@
 		(ctx)->pc = (uintptr_t) (_pc); \
 		(ctx)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA; \
-		(ctx)->fp = 0; \
 		(ctx)->tls = ((uintptr_t) (ptls)) + sizeof(tcb_t); \
 	} while (0)
@@ -54,14 +53,7 @@
 typedef struct {
 	uintptr_t sp;
-	uintptr_t fp;
 	uintptr_t pc;
 	uintptr_t tls;
 } context_t;
-
-static inline uintptr_t context_get_fp(context_t *ctx)
-{
-	/* On real hardware, this function returns the frame pointer. */
-	return ctx->fp;
-}
 
 #endif
Index: uspace/lib/c/arch/amd64/include/fibril.h
===================================================================
--- uspace/lib/c/arch/amd64/include/fibril.h	(revision e503d3a91732d66c7e65daa54068b5868679fa30)
+++ uspace/lib/c/arch/amd64/include/fibril.h	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
@@ -56,22 +56,17 @@
  */
 typedef struct {
-	uint64_t sp;
-	uint64_t pc;
+    uint64_t sp;
+    uint64_t pc;
+    
+    uint64_t rbx;
+    uint64_t rbp;
 
-	uint64_t rbx;
-	uint64_t rbp;
+    uint64_t r12;
+    uint64_t r13;
+    uint64_t r14;
+    uint64_t r15;
 
-	uint64_t r12;
-	uint64_t r13;
-	uint64_t r14;
-	uint64_t r15;
-
-	uint64_t tls;
+    uint64_t tls;
 } context_t;
-
-static inline uintptr_t context_get_fp(context_t *ctx)
-{
-	return ctx->rbp;
-}
 
 #endif
Index: uspace/lib/c/arch/arm32/include/fibril.h
===================================================================
--- uspace/lib/c/arch/arm32/include/fibril.h	(revision e503d3a91732d66c7e65daa54068b5868679fa30)
+++ uspace/lib/c/arch/arm32/include/fibril.h	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
@@ -86,9 +86,4 @@
 } context_t;
 
-static inline uintptr_t context_get_fp(context_t *ctx)
-{
-	return ctx->fp;
-}
-
 
 #endif
Index: uspace/lib/c/arch/ia32/include/fibril.h
===================================================================
--- uspace/lib/c/arch/ia32/include/fibril.h	(revision e503d3a91732d66c7e65daa54068b5868679fa30)
+++ uspace/lib/c/arch/ia32/include/fibril.h	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
@@ -67,9 +67,4 @@
 } context_t;
 
-static inline uintptr_t context_get_fp(context_t *ctx)
-{
-	return ctx->ebp;
-}
-
 #endif
 
Index: uspace/lib/c/arch/ia64/include/fibril.h
===================================================================
--- uspace/lib/c/arch/ia64/include/fibril.h	(revision e503d3a91732d66c7e65daa54068b5868679fa30)
+++ uspace/lib/c/arch/ia64/include/fibril.h	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
@@ -130,9 +130,4 @@
 } context_t;
 
-static inline uintptr_t context_get_fp(context_t *ctx)
-{
-	return 0;	/* FIXME */
-}
-
 #endif
 
Index: uspace/lib/c/arch/mips32/include/fibril.h
===================================================================
--- uspace/lib/c/arch/mips32/include/fibril.h	(revision e503d3a91732d66c7e65daa54068b5868679fa30)
+++ uspace/lib/c/arch/mips32/include/fibril.h	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
@@ -85,9 +85,4 @@
 } context_t;
 
-static inline uintptr_t context_get_fp(context_t *ctx)
-{
-	return ctx->sp;
-}
-
 #endif
 
Index: uspace/lib/c/arch/ppc32/include/fibril.h
===================================================================
--- uspace/lib/c/arch/ppc32/include/fibril.h	(revision e503d3a91732d66c7e65daa54068b5868679fa30)
+++ uspace/lib/c/arch/ppc32/include/fibril.h	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
@@ -78,9 +78,4 @@
 } __attribute__ ((packed)) context_t;
 
-static inline uintptr_t context_get_fp(context_t *ctx)
-{
-	return ctx->sp;
-}
-
 #endif
 
Index: uspace/lib/c/arch/sparc64/include/fibril.h
===================================================================
--- uspace/lib/c/arch/sparc64/include/fibril.h	(revision e503d3a91732d66c7e65daa54068b5868679fa30)
+++ uspace/lib/c/arch/sparc64/include/fibril.h	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
@@ -77,9 +77,4 @@
 } context_t;
 
-static inline uintptr_t context_get_fp(context_t *ctx)
-{
-	return ctx->sp + STACK_BIAS;
-}
-
 #endif
 
Index: uspace/lib/c/generic/fibril.c
===================================================================
--- uspace/lib/c/generic/fibril.c	(revision e503d3a91732d66c7e65daa54068b5868679fa30)
+++ uspace/lib/c/generic/fibril.c	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
@@ -275,6 +275,4 @@
 	fibril->func = func;
 	fibril->arg = arg;
-
-	fibril->waits_for = NULL;
 	
 	context_save(&fibril->ctx);
Index: uspace/lib/c/generic/fibril_synch.c
===================================================================
--- uspace/lib/c/generic/fibril_synch.c	(revision e503d3a91732d66c7e65daa54068b5868679fa30)
+++ uspace/lib/c/generic/fibril_synch.c	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
@@ -42,6 +42,4 @@
 #include <errno.h>
 #include <assert.h>
-#include <stacktrace.h>
-#include <stdlib.h>
 
 static void optimize_execution_power(void)
@@ -58,42 +56,6 @@
 }
 
-static bool check_for_deadlock(fibril_owner_info_t *oi)
-{
-	while (oi && oi->owned_by) {
-		if (oi->owned_by == (fibril_t *) fibril_get_id())
-			return true;
-		oi = oi->owned_by->waits_for;
-	}
-
-	return false;
-}
-
-static void print_deadlock(fibril_owner_info_t *oi)
-{
-	fibril_t *f = (fibril_t *) fibril_get_id();
-
-	printf("Deadlock detected.\n");
-	stacktrace_print();
-
-	printf("Fibril %p waits for primitive %p.\n", f, oi);
-
-	while (oi && oi->owned_by) {
-		printf("Primitive %p is owned by fibril %p.\n",
-		    oi, oi->owned_by);
-		if (oi->owned_by == f)
-			break;
-		stacktrace_print_fp_pc(context_get_fp(&oi->owned_by->ctx),
-		    oi->owned_by->ctx.pc);
-		printf("Fibril %p waits for primitive %p.\n",
-		     oi->owned_by, oi->owned_by->waits_for);
-		oi = oi->owned_by->waits_for;
-	}
-
-	abort();
-}
-
 void fibril_mutex_initialize(fibril_mutex_t *fm)
 {
-	fm->oi.owned_by = NULL;
 	fm->counter = 1;
 	list_initialize(&fm->waiters);
@@ -102,6 +64,4 @@
 void fibril_mutex_lock(fibril_mutex_t *fm)
 {
-	fibril_t *f = (fibril_t *) fibril_get_id();
-
 	futex_down(&async_futex);
 	if (fm->counter-- <= 0) {
@@ -113,12 +73,6 @@
 		link_initialize(&wdata.wu_event.link);
 		list_append(&wdata.wu_event.link, &fm->waiters);
-
-		if (check_for_deadlock(&fm->oi))
-			print_deadlock(&fm->oi);
-		f->waits_for = &fm->oi;
-
 		fibril_switch(FIBRIL_TO_MANAGER);
 	} else {
-		fm->oi.owned_by = f;
 		futex_up(&async_futex);
 	}
@@ -132,5 +86,4 @@
 	if (fm->counter > 0) {
 		fm->counter--;
-		fm->oi.owned_by = (fibril_t *) fibril_get_id();
 		locked = true;
 	}
@@ -146,5 +99,4 @@
 		link_t *tmp;
 		awaiter_t *wdp;
-		fibril_t *f;
 	
 		assert(!list_empty(&fm->waiters));
@@ -153,14 +105,7 @@
 		wdp->active = true;
 		wdp->wu_event.inlist = false;
-
-		f = (fibril_t *) wdp->fid;
-		fm->oi.owned_by = f;
-		f->waits_for = NULL;
-
 		list_remove(&wdp->wu_event.link);
 		fibril_add_ready(wdp->fid);
 		optimize_execution_power();
-	} else {
-		fm->oi.owned_by = NULL;
 	}
 }
@@ -175,5 +120,4 @@
 void fibril_rwlock_initialize(fibril_rwlock_t *frw)
 {
-	frw->oi.owned_by = NULL;
 	frw->writers = 0;
 	frw->readers = 0;
Index: uspace/lib/c/include/fibril.h
===================================================================
--- uspace/lib/c/include/fibril.h	(revision e503d3a91732d66c7e65daa54068b5868679fa30)
+++ uspace/lib/c/include/fibril.h	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
@@ -48,10 +48,4 @@
 #define FIBRIL_WRITER      2
 
-struct fibril;
-
-typedef struct {
-	struct fibril *owned_by;
-} fibril_owner_info_t;
-
 typedef enum {
 	FIBRIL_PREEMPT,
@@ -74,6 +68,4 @@
 	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 e503d3a91732d66c7e65daa54068b5868679fa30)
+++ uspace/lib/c/include/fibril_synch.h	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
@@ -43,5 +43,4 @@
 
 typedef struct {
-	fibril_owner_info_t oi;		/* Keep this the first thing. */
 	int counter;
 	link_t waiters;
@@ -50,7 +49,4 @@
 #define FIBRIL_MUTEX_INITIALIZER(name) \
 	{ \
-		.oi = { \
-			.owned_by = NULL \
-		}, \
 		.counter = 1, \
 		.waiters = { \
@@ -64,5 +60,4 @@
 
 typedef struct {
-	fibril_owner_info_t oi;	/* Keep this the first thing. */
 	unsigned writers;
 	unsigned readers;
@@ -72,7 +67,4 @@
 #define FIBRIL_RWLOCK_INITIALIZER(name) \
 	{ \
-		.oi = { \
-			.owned_by = NULL \
-		}, \
 		.readers = 0, \
 		.writers = 0, \
