feat: lru eviction policy on page caches
[lunaix-os.git] / lunaix-os / includes / lunaix / ds / llist.h
index 9af9dd1fba4ebe90fe86090e3e72438492cea95e..6129ca05a83bd015b20058c8c9ac1bd68276e69c 100644 (file)
@@ -41,13 +41,13 @@ llist_init_head(struct llist_header* head)
 static inline void
 llist_append(struct llist_header* head, struct llist_header* elem)
 {
-    __llist_add(elem, head, head->next);
+    __llist_add(elem, head->prev, head);
 }
 
 static inline void
 llist_prepend(struct llist_header* head, struct llist_header* elem)
 {
-    __llist_add(elem, head->prev, head);
+    __llist_add(elem, head, head->next);
 }
 
 static inline void