summaryrefslogtreecommitdiffstats
path: root/lib/list/list.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/list/list.h')
-rw-r--r--lib/list/list.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/list/list.h b/lib/list/list.h
index 0174b90..ad562e4 100644
--- a/lib/list/list.h
+++ b/lib/list/list.h
@@ -1,6 +1,8 @@
#ifndef _LIST_H
#define _LIST_H
+#include <util/util.h>
+
struct list_item {
struct list_item *prev, *next;
};
@@ -9,16 +11,6 @@ struct list {
struct list_item head;
};
-#ifndef container_of
-#define container_of(_ptr, _type, _member) ({ \
- const typeof( ((_type *)0)->_member ) *__mptr = (_ptr); \
- (_type *)( (char *)__mptr - offsetof(_type,_member) );})
-#endif
-
-#ifndef offsetof
-#define offsetof(_type, _member) ((size_t) &((_type *)0)->_member)
-#endif
-
#define list_for_each(_list, _pos) \
for (_pos = (_list)->head.next; _pos != ((_list)->head); _pos = _pos->next)
OpenPOWER on IntegriCloud