Index: uspace/lib/libblock/libblock.c
===================================================================
--- uspace/lib/libblock/libblock.c	(revision 61d23157851792db1cc8126e35bfe4099ee1779b)
+++ uspace/lib/libblock/libblock.c	(revision ac47b7c2b6e75a9b9aa60b443fca9a151cf89e5c)
@@ -47,5 +47,5 @@
 #include <as.h>
 #include <assert.h>
-#include <futex.h>
+#include <fibril_sync.h>
 #include <adt/list.h>
 #include <adt/hash_table.h>
@@ -53,5 +53,5 @@
 
 /** Lock protecting the device connection list */
-static futex_t dcl_lock = FUTEX_INITIALIZER;
+static FIBRIL_MUTEX_INITIALIZE(dcl_lock);
 /** Device connection list head. */
 static LIST_INITIALIZE(dcl_head);
@@ -61,5 +61,5 @@
 
 typedef struct {
-	futex_t lock;
+	fibril_mutex_t lock;
 	size_t block_size;		/**< Block size. */
 	unsigned block_count;		/**< Total number of blocks. */
@@ -84,13 +84,13 @@
 	link_t *cur;
 
-	futex_down(&dcl_lock);
+	fibril_mutex_lock(&dcl_lock);
 	for (cur = dcl_head.next; cur != &dcl_head; cur = cur->next) {
 		devcon_t *devcon = list_get_instance(cur, devcon_t, link);
 		if (devcon->dev_handle == dev_handle) {
-			futex_up(&dcl_lock);
+			fibril_mutex_unlock(&dcl_lock);
 			return devcon;
 		}
 	}
-	futex_up(&dcl_lock);
+	fibril_mutex_unlock(&dcl_lock);
 	return NULL;
 }
@@ -116,9 +116,9 @@
 	devcon->cache = NULL;
 
-	futex_down(&dcl_lock);
+	fibril_mutex_lock(&dcl_lock);
 	for (cur = dcl_head.next; cur != &dcl_head; cur = cur->next) {
 		devcon_t *d = list_get_instance(cur, devcon_t, link);
 		if (d->dev_handle == dev_handle) {
-			futex_up(&dcl_lock);
+			fibril_mutex_unlock(&dcl_lock);
 			free(devcon);
 			return EEXIST;
@@ -126,5 +126,5 @@
 	}
 	list_append(&devcon->link, &dcl_head);
-	futex_up(&dcl_lock);
+	fibril_mutex_unlock(&dcl_lock);
 	return EOK;
 }
@@ -132,7 +132,7 @@
 static void devcon_remove(devcon_t *devcon)
 {
-	futex_down(&dcl_lock);
+	fibril_mutex_lock(&dcl_lock);
 	list_remove(&devcon->link);
-	futex_up(&dcl_lock);
+	fibril_mutex_unlock(&dcl_lock);
 }
 
@@ -263,5 +263,5 @@
 		return ENOMEM;
 	
-	futex_initialize(&cache->lock, 1);
+	fibril_mutex_initialize(&cache->lock);
 	list_initialize(&cache->free_head);
 	cache->block_size = size;
@@ -285,8 +285,8 @@
 static void block_initialize(block_t *b)
 {
-	futex_initialize(&b->lock, 1);
+	fibril_mutex_initialize(&b->lock);
 	b->refcnt = 1;
 	b->dirty = false;
-	rwlock_initialize(&b->contents_lock);
+	fibril_rwlock_initialize(&b->contents_lock);
 	link_initialize(&b->free_link);
 	link_initialize(&b->hash_link);
@@ -317,5 +317,5 @@
 	
 	cache = devcon->cache;
-	futex_down(&cache->lock);
+	fibril_mutex_lock(&cache->lock);
 	l = hash_table_find(&cache->block_hash, &key);
 	if (l) {
@@ -324,9 +324,9 @@
 		 */
 		b = hash_table_get_instance(l, block_t, hash_link);
-		futex_down(&b->lock);
+		fibril_mutex_lock(&b->lock);
 		if (b->refcnt++ == 0)
 			list_remove(&b->free_link);
-		futex_up(&b->lock);
-		futex_up(&cache->lock);
+		fibril_mutex_unlock(&b->lock);
+		fibril_mutex_unlock(&cache->lock);
 	} else {
 		/*
@@ -379,6 +379,6 @@
 		 * block.
 		 */
-		futex_down(&b->lock);
-		futex_up(&cache->lock);
+		fibril_mutex_lock(&b->lock);
+		fibril_mutex_unlock(&cache->lock);
 
 		if (sync) {
@@ -394,12 +394,10 @@
 			 * the new contents from the device.
 			 */
-			async_serialize_start();
 			rc = block_read(dev_handle, &bufpos, &buflen, &pos,
 			    b->data, cache->block_size, cache->block_size);
-			async_serialize_end();
 			assert(rc == EOK);
 		}
 
-		futex_up(&b->lock);
+		fibril_mutex_unlock(&b->lock);
 	}
 	return b;
@@ -421,6 +419,6 @@
 
 	cache = devcon->cache;
-	futex_down(&cache->lock);
-	futex_down(&block->lock);
+	fibril_mutex_lock(&cache->lock);
+	fibril_mutex_lock(&block->lock);
 	if (!--block->refcnt) {
 		/*
@@ -430,6 +428,6 @@
 		list_append(&block->free_link, &cache->free_head);
 	}
-	futex_up(&block->lock);
-	futex_up(&cache->lock);	
+	fibril_mutex_unlock(&block->lock);
+	fibril_mutex_unlock(&cache->lock);
 }
 
Index: uspace/lib/libblock/libblock.h
===================================================================
--- uspace/lib/libblock/libblock.h	(revision 61d23157851792db1cc8126e35bfe4099ee1779b)
+++ uspace/lib/libblock/libblock.h	(revision ac47b7c2b6e75a9b9aa60b443fca9a151cf89e5c)
@@ -40,6 +40,5 @@
 #include <stdint.h>
 #include "../../srv/vfs/vfs.h"
-#include <futex.h>
-#include <rwlock.h>
+#include <fibril_sync.h>
 #include <adt/hash_table.h>
 #include <adt/list.h>
@@ -64,6 +63,6 @@
 
 typedef struct block {
-	/** Futex protecting the reference count. */
-	futex_t lock;
+	/** Mutex protecting the reference count. */
+	fibril_mutex_t lock;
 	/** Number of references to the block_t structure. */
 	unsigned refcnt;
@@ -71,5 +70,5 @@
 	bool dirty;
 	/** Readers / Writer lock protecting the contents of the block. */
-	rwlock_t contents_lock;
+	fibril_rwlock_t contents_lock;
 	/** Handle of the device where the block resides. */
 	dev_handle_t dev_handle;
