Index: kernel/generic/include/proc/task.h
===================================================================
--- kernel/generic/include/proc/task.h	(revision 04d66804623c1e241e9426d0016534aa65a96110)
+++ kernel/generic/include/proc/task.h	(revision 669f3d321e8829b7e31263be9622012f870d9539)
@@ -43,6 +43,8 @@
 #include <synch/mutex.h>
 #include <synch/futex.h>
+#include <synch/workqueue.h>
 #include <adt/avl.h>
 #include <adt/btree.h>
+#include <adt/cht.h>
 #include <adt/list.h>
 #include <security/cap.h>
@@ -127,11 +129,13 @@
 	task_arch_t arch;
 	
-	/**
-	 * Serializes access to the B+tree of task's futexes. This mutex is
-	 * independent on the task spinlock.
-	 */
-	mutex_t futexes_lock;
-	/** B+tree of futexes referenced by this task. */
-	btree_t futexes;
+	/** Serializes access to futex_list (independent of the task spinlock). */
+	mutex_t futex_list_lock;
+	/** List of all futexes accesses by this task. */
+	list_t futex_list;
+	/** CHT mapping virtual addresses of futex variables to futex objects. */
+	struct futex_cache {
+		work_t destroy_work;
+		cht_t ht;
+	} *futexes;
 	
 	/** Accumulated accounting. */
Index: kernel/generic/include/synch/futex.h
===================================================================
--- kernel/generic/include/synch/futex.h	(revision 04d66804623c1e241e9426d0016534aa65a96110)
+++ kernel/generic/include/synch/futex.h	(revision 669f3d321e8829b7e31263be9622012f870d9539)
@@ -55,5 +55,7 @@
 extern sysarg_t sys_futex_wakeup(uintptr_t);
 
-extern void futex_cleanup(void);
+extern void futex_task_cleanup(void);
+extern void futex_task_init(struct task *);
+extern void futex_task_deinit(struct task *);
 
 #endif
