tdm_hwc: add fence api and backend interface
[platform/core/uifw/libtdm.git] / include / tdm_list.h
index 7475894..3873817 100644 (file)
@@ -112,6 +112,12 @@ static inline int list_length(struct list_head *item)
 #define LIST_ENTRY(__type, __item, __field)   \
        ((__type *)(((char *)(__item)) - offsetof(__type, __field)))
 
+#define LIST_FIRST_ENTRY(__ptr, __type, __field)   \
+       LIST_ENTRY(__type, (__ptr)->next, __field)
+
+#define LIST_LAST_ENTRY(__ptr, __type, __field)   \
+       LIST_ENTRY(__type, (__ptr)->prev, __field)
+
 #define LIST_IS_EMPTY(__list)                   \
        ((__list)->next == (__list))