Index: src/libcfa/bits/containers.h
===================================================================
--- src/libcfa/bits/containers.h	(revision 9181f1df605f5f078e13252e4068d7734468edf1)
+++ src/libcfa/bits/containers.h	(revision 5fec3f6589753dd1111fa51da42185c12bd181c3)
@@ -186,4 +186,78 @@
 #endif
 
+
+//-----------------------------------------------------------------------------
+// Doubly Linked List
+//-----------------------------------------------------------------------------
+#ifdef __cforall
+	trait is_db_node(dtype T) {
+		T*& get_next( T& );
+		T*& get_prev( T& );
+	};
+#endif
+
+#ifdef __cforall
+	forall(dtype TYPE | is_db_node(TYPE))
+	#define T TYPE
+#else
+	#define T void
+#endif
+struct __dllist {
+	T * head;
+};
+#undef T
+
+#ifdef __cforall
+#define __dllist_t(T) __dllist(T)
+#else
+#define __dllist_t(T) struct __dllist
+#endif
+
+#ifdef __cforall
+
+	forall(dtype T | is_db_node(T))
+	static inline void ?{}( __dllist(T) & this ) with( this ) {
+		head{ NULL };
+	}
+
+	// forall(dtype T | is_db_node(T) | sized(T))
+	// static inline void push_front( __dllist(T) & this, T & node ) with( this ) {
+	// 	if ( head ) {
+	// 		get_next( node ) = head;
+	// 		get_prev( node ) = get_prev( *head );
+	// 		// inserted node must be consistent before it is seen
+	// 		// prevent code movement across barrier
+	// 		asm( "" : : : "memory" );
+	// 		get_prev( *head ) = node;
+	// 		T & prev = *get_prev( node );
+	// 		get_next( prev ) = node;
+	// 	}
+	// 	else {
+	// 		get_next( node ) = &node;
+	// 		get_prev( node ) = &node;
+	// 	}
+
+	// 	// prevent code movement across barrier
+	// 	asm( "" : : : "memory" );
+	// 	head = val;
+	// }
+
+	// forall(dtype T | is_db_node(T) | sized(T))
+	// static inline T * remove( __dllist(T) & this, T & node ) with( this ) {
+	// 	if ( &node == head ) {
+	// 		if ( get_next( *head ) == head ) {
+	// 			head = NULL;
+	// 		}
+	// 		else {
+	// 			head = get_next( *head );
+	// 		}
+	// 	}
+	// 	get_prev( *get_next( node ) ) = get_prev( node );
+	// 	get_next( *get_prev( node ) ) = get_next( node );
+	// 	get_next( node ) = NULL;
+	// 	get_prev( node ) = NULL;
+	// }
+#endif
+
 //-----------------------------------------------------------------------------
 // Tools
