Index: uspace/lib/c/generic/async/ports.c
===================================================================
--- uspace/lib/c/generic/async/ports.c	(revision 9f272d9b29449d9630f3c3682f93e9e5ced70f4e)
+++ uspace/lib/c/generic/async/ports.c	(revision 5c76cc61bc720674ef5280816ea825e0fcea7a02)
@@ -60,7 +60,4 @@
 	iface_t iface;
 
-	/** Futex protecting the hash table */
-	futex_t futex;
-
 	/** Interface ports */
 	hash_table_t port_hash_table;
@@ -104,4 +101,6 @@
 static void *fallback_port_data = NULL;
 
+/** Futex guarding the interface hash table. */
+static futex_t interface_futex = FUTEX_INITIALIZER;
 static hash_table_t interface_hash_table;
 
@@ -177,5 +176,4 @@
 
 	interface->iface = iface;
-	futex_initialize(&interface->futex, 1);
 	interface->port_id_avail = 0;
 
@@ -188,10 +186,9 @@
     async_port_handler_t handler, void *data)
 {
+	// TODO: Move the malloc out of critical section.
 	port_t *port = (port_t *) malloc(sizeof(port_t));
 	if (!port)
 		return NULL;
 
-	futex_down(&interface->futex);
-
 	port_id_t id = interface->port_id_avail;
 	interface->port_id_avail++;
@@ -203,6 +200,4 @@
 	hash_table_insert(&interface->port_hash_table, &port->link);
 
-	futex_up(&interface->futex);
-
 	return port;
 }
@@ -213,5 +208,5 @@
 	interface_t *interface;
 
-	futex_down(&async_futex);
+	futex_lock(&interface_futex);
 
 	ht_link_t *link = hash_table_find(&interface_hash_table, &iface);
@@ -222,5 +217,5 @@
 
 	if (!interface) {
-		futex_up(&async_futex);
+		futex_unlock(&interface_futex);
 		return ENOMEM;
 	}
@@ -228,5 +223,5 @@
 	port_t *port = async_new_port(interface, handler, data);
 	if (!port) {
-		futex_up(&async_futex);
+		futex_unlock(&interface_futex);
 		return ENOMEM;
 	}
@@ -234,5 +229,5 @@
 	*port_id = port->id;
 
-	futex_up(&async_futex);
+	futex_unlock(&interface_futex);
 
 	return EOK;
@@ -260,5 +255,5 @@
 	port_t *port = NULL;
 
-	futex_down(&async_futex);
+	futex_lock(&interface_futex);
 
 	ht_link_t *link = hash_table_find(&interface_hash_table, &iface);
@@ -272,5 +267,5 @@
 	}
 
-	futex_up(&async_futex);
+	futex_unlock(&interface_futex);
 
 	return port;
