Index: uspace/lib/c/generic/async/ports.c
===================================================================
--- uspace/lib/c/generic/async/ports.c	(revision 40abf56ae4263cdef7e6b8d2a4f5f794c32dedf3)
+++ uspace/lib/c/generic/async/ports.c	(revision 9bde0d5d49e92705a496ff7207d8be4268690bb1)
@@ -99,5 +99,5 @@
 
 /** Futex guarding the interface hash table. */
-static futex_t interface_futex = FUTEX_INITIALIZER;
+static FIBRIL_RMUTEX_INITIALIZE(interface_mutex);
 static hash_table_t interface_hash_table;
 
@@ -205,5 +205,5 @@
 	interface_t *interface;
 
-	futex_lock(&interface_futex);
+	fibril_rmutex_lock(&interface_mutex);
 
 	ht_link_t *link = hash_table_find(&interface_hash_table, &iface);
@@ -214,5 +214,5 @@
 
 	if (!interface) {
-		futex_unlock(&interface_futex);
+		fibril_rmutex_unlock(&interface_mutex);
 		return ENOMEM;
 	}
@@ -220,5 +220,5 @@
 	port_t *port = async_new_port(interface, handler, data);
 	if (!port) {
-		futex_unlock(&interface_futex);
+		fibril_rmutex_unlock(&interface_mutex);
 		return ENOMEM;
 	}
@@ -226,5 +226,5 @@
 	*port_id = port->id;
 
-	futex_unlock(&interface_futex);
+	fibril_rmutex_unlock(&interface_mutex);
 
 	return EOK;
@@ -252,5 +252,5 @@
 	port_t *port = NULL;
 
-	futex_lock(&interface_futex);
+	fibril_rmutex_lock(&interface_mutex);
 
 	ht_link_t *link = hash_table_find(&interface_hash_table, &iface);
@@ -264,5 +264,5 @@
 	}
 
-	futex_unlock(&interface_futex);
+	fibril_rmutex_unlock(&interface_mutex);
 
 	return port;
Index: uspace/lib/c/generic/async/server.c
===================================================================
--- uspace/lib/c/generic/async/server.c	(revision 40abf56ae4263cdef7e6b8d2a4f5f794c32dedf3)
+++ uspace/lib/c/generic/async/server.c	(revision 9bde0d5d49e92705a496ff7207d8be4268690bb1)
@@ -234,9 +234,9 @@
 }
 
-static futex_t client_futex = FUTEX_INITIALIZER;
+static FIBRIL_RMUTEX_INITIALIZE(client_mutex);
 static hash_table_t client_hash_table;
 
 // TODO: lockfree notification_queue?
-static futex_t notification_futex = FUTEX_INITIALIZER;
+static FIBRIL_RMUTEX_INITIALIZE(notification_mutex);
 static hash_table_t notification_hash_table;
 static LIST_INITIALIZE(notification_queue);
@@ -339,5 +339,5 @@
 	client_t *client = NULL;
 
-	futex_lock(&client_futex);
+	fibril_rmutex_lock(&client_mutex);
 	ht_link_t *link = hash_table_find(&client_hash_table, &client_id);
 	if (link) {
@@ -346,4 +346,5 @@
 	} else if (create) {
 		// TODO: move the malloc out of critical section
+		/* malloc() is rmutex safe. */
 		client = malloc(sizeof(client_t));
 		if (client) {
@@ -356,5 +357,5 @@
 	}
 
-	futex_unlock(&client_futex);
+	fibril_rmutex_unlock(&client_mutex);
 	return client;
 }
@@ -364,5 +365,5 @@
 	bool destroy;
 
-	futex_lock(&client_futex);
+	fibril_rmutex_lock(&client_mutex);
 
 	if (atomic_predec(&client->refcnt) == 0) {
@@ -372,5 +373,5 @@
 		destroy = false;
 
-	futex_unlock(&client_futex);
+	fibril_rmutex_unlock(&client_mutex);
 
 	if (destroy) {
@@ -693,5 +694,5 @@
 		fibril_semaphore_down(&notification_semaphore);
 
-		futex_lock(&notification_futex);
+		fibril_rmutex_lock(&notification_mutex);
 
 		/*
@@ -727,5 +728,5 @@
 			list_remove(&notification->qlink);
 
-		futex_unlock(&notification_futex);
+		fibril_rmutex_unlock(&notification_mutex);
 
 		if (handler)
@@ -766,5 +767,5 @@
 	assert(call);
 
-	futex_lock(&notification_futex);
+	fibril_rmutex_lock(&notification_mutex);
 
 	notification_msg_t *m = list_pop(&notification_freelist,
@@ -772,5 +773,5 @@
 
 	if (!m) {
-		futex_unlock(&notification_futex);
+		fibril_rmutex_unlock(&notification_mutex);
 		m = malloc(sizeof(notification_msg_t));
 		if (!m) {
@@ -779,5 +780,5 @@
 		}
 
-		futex_lock(&notification_futex);
+		fibril_rmutex_lock(&notification_mutex);
 		notification_freelist_total++;
 	}
@@ -789,5 +790,5 @@
 		// TODO: Make sure this can't happen and turn it into assert.
 		notification_freelist_total--;
-		futex_unlock(&notification_futex);
+		fibril_rmutex_unlock(&notification_mutex);
 		free(m);
 		return;
@@ -804,5 +805,5 @@
 		list_append(&notification->qlink, &notification_queue);
 
-	futex_unlock(&notification_futex);
+	fibril_rmutex_unlock(&notification_mutex);
 
 	fibril_semaphore_up(&notification_semaphore);
@@ -829,5 +830,5 @@
 	fid_t fib = 0;
 
-	futex_lock(&notification_futex);
+	fibril_rmutex_lock(&notification_mutex);
 
 	if (notification_avail == 0) {
@@ -835,5 +836,5 @@
 		fib = fibril_create(notification_fibril_func, NULL);
 		if (fib == 0) {
-			futex_unlock(&notification_futex);
+			fibril_rmutex_unlock(&notification_mutex);
 			free(notification);
 			return NULL;
@@ -847,5 +848,5 @@
 	hash_table_insert(&notification_hash_table, &notification->htlink);
 
-	futex_unlock(&notification_futex);
+	fibril_rmutex_unlock(&notification_mutex);
 
 	if (imethod == 0) {
Index: uspace/lib/c/generic/malloc.c
===================================================================
--- uspace/lib/c/generic/malloc.c	(revision 40abf56ae4263cdef7e6b8d2a4f5f794c32dedf3)
+++ uspace/lib/c/generic/malloc.c	(revision 9bde0d5d49e92705a496ff7207d8be4268690bb1)
@@ -44,5 +44,5 @@
 #include <bitops.h>
 #include <mem.h>
-#include <futex.h>
+#include <fibril_synch.h>
 #include <stdlib.h>
 #include <adt/gcdlcm.h>
@@ -194,32 +194,12 @@
 
 /** Futex for thread-safe heap manipulation */
-static futex_t malloc_futex = FUTEX_INITIALIZER;
+static FIBRIL_RMUTEX_INITIALIZE(malloc_mutex);
 
 #define malloc_assert(expr) safe_assert(expr)
-
-#ifdef FUTEX_UPGRADABLE
-/** True if the heap may be accessed from multiple threads. */
-static bool multithreaded = false;
-
-/** Makes accesses to the heap thread safe. */
-void malloc_enable_multithreaded(void)
-{
-	multithreaded = true;
-}
 
 /** Serializes access to the heap from multiple threads. */
 static inline void heap_lock(void)
 {
-	if (multithreaded) {
-		futex_down(&malloc_futex);
-	} else {
-		/*
-		 * Malloc never switches fibrils while the heap is locked.
-		 * Similarly, it never creates new threads from within the
-		 * locked region. Therefore, if there are no other threads
-		 * except this one, the whole operation will complete without
-		 * any interruptions.
-		 */
-	}
+	fibril_rmutex_lock(&malloc_mutex);
 }
 
@@ -227,38 +207,6 @@
 static inline void heap_unlock(void)
 {
-	if (multithreaded) {
-		futex_up(&malloc_futex);
-	} else {
-		/*
-		 * Malloc never switches fibrils while the heap is locked.
-		 * Similarly, it never creates new threads from within the
-		 * locked region. Therefore, if there are no other threads
-		 * except this one, the whole operation will complete without
-		 * any interruptions.
-		 */
-	}
-}
-
-#else
-
-/** Makes accesses to the heap thread safe. */
-void malloc_enable_multithreaded(void)
-{
-	/* No-op. Already using thread-safe heap locking operations. */
-}
-
-/** Serializes access to the heap from multiple threads. */
-static inline void heap_lock(void)
-{
-	futex_down(&malloc_futex);
-}
-
-/** Serializes access to the heap from multiple threads. */
-static inline void heap_unlock(void)
-{
-	futex_up(&malloc_futex);
-}
-#endif
-
+	fibril_rmutex_unlock(&malloc_mutex);
+}
 
 /** Initialize a heap block
Index: uspace/lib/c/generic/thread.c
===================================================================
--- uspace/lib/c/generic/thread.c	(revision 40abf56ae4263cdef7e6b8d2a4f5f794c32dedf3)
+++ uspace/lib/c/generic/thread.c	(revision 9bde0d5d49e92705a496ff7207d8be4268690bb1)
@@ -116,7 +116,4 @@
 	}
 
-	/* Make heap thread safe. */
-	malloc_enable_multithreaded();
-
 	fibril->arg = arg;
 	uarg->uspace_entry = (void *) FADDR(__thread_entry);
Index: uspace/lib/c/include/malloc.h
===================================================================
--- uspace/lib/c/include/malloc.h	(revision 40abf56ae4263cdef7e6b8d2a4f5f794c32dedf3)
+++ uspace/lib/c/include/malloc.h	(revision 9bde0d5d49e92705a496ff7207d8be4268690bb1)
@@ -49,5 +49,4 @@
 extern void *heap_check(void);
 
-extern void malloc_enable_multithreaded(void);
 #endif
 
